Skip to content

Commit

Permalink
handle undefined & null
Browse files Browse the repository at this point in the history
  • Loading branch information
marckrenn authored Nov 20, 2017
1 parent 4467bf5 commit 4a07194
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion firebase.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class exports.Firebase extends Framer.BaseClass
when 2 then console.log "Firebase: Request received \n URL: '#{url}'" if debug
when 3 then console.log "Firebase: Processing request \n URL: '#{url}'" if debug
when 4
unless xhttp.responseText is null
if xhttp.responseText?
callback(JSON.parse(xhttp.responseText)) if callback?
console.log "Firebase: Request finished, response: '#{JSON.parse(xhttp.responseText)}' \n URL: '#{url}'" if debug
else
Expand Down

0 comments on commit 4a07194

Please sign in to comment.