no console logs in production

This commit is contained in:
Galen Wolfe-Pauly 2014-08-11 12:57:25 -07:00
parent 7c543b2f22
commit db727ccf13
2 changed files with 14 additions and 6 deletions

View File

@ -1191,11 +1191,20 @@
if(cb) { if(cb) {
xhr.onload = function() { xhr.onload = function() {
console.log("response text" + this.responseText); try {
cb(null,{ err = null
status:this.status, res = {
data:JSON.parse(this.responseText) status:this.status,
}) data: JSON.parse(this.responseText)
}
} catch(e) {
err = {
message:"Failed to parse JSON",
raw:this.responseText
}
res = null
}
cb(err,res)
} }
xhr.onerror = function() { xhr.onerror = function() {
cb({ cb({

View File

@ -29,7 +29,6 @@ window.urb.send = function(params,cb) {
} }
window.urb.subscribe = function(params,cb) { window.urb.subscribe = function(params,cb) {
console.log("Someone is subscribing");
if(!cb) if(!cb)
throw new Error("You must supply a callback to urb.subscribe.") throw new Error("You must supply a callback to urb.subscribe.")
if(!params) if(!params)