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) {
|
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({
|
||||||
|
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user