mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-15 01:52:42 +03:00
no console logs in production
This commit is contained in:
parent
7c543b2f22
commit
db727ccf13
@ -1191,11 +1191,20 @@
|
||||
|
||||
if(cb) {
|
||||
xhr.onload = function() {
|
||||
console.log("response text" + this.responseText);
|
||||
cb(null,{
|
||||
status:this.status,
|
||||
data:JSON.parse(this.responseText)
|
||||
})
|
||||
try {
|
||||
err = null
|
||||
res = {
|
||||
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() {
|
||||
cb({
|
||||
|
@ -29,7 +29,6 @@ window.urb.send = function(params,cb) {
|
||||
}
|
||||
|
||||
window.urb.subscribe = function(params,cb) {
|
||||
console.log("Someone is subscribing");
|
||||
if(!cb)
|
||||
throw new Error("You must supply a callback to urb.subscribe.")
|
||||
if(!params)
|
||||
|
Loading…
Reference in New Issue
Block a user