
In this specific example, I'm pulling "bar3_value" from a token, then parsing it into a number. How would I catch it before it throws the error, causing my script to fail? For example: var truemod = parseInt(obj.get("bar3_value")); is what I have, but that (of course) throws an error if bar3_value is NaN. In case I'm just misunderstanding, this is the error I'm getting: /home/symbly/www/d20-api-server/node_modules/firebase/lib/firebase-node.js:1
orts, require, module, __filename, __dirname) { function f(a){throw a;}var j=v
^
Error: Firebase.update failed: First argument contains NaN in property 'bar3_value'
at Error (<anonymous>)
at Aa (/home/symbly/www/d20-api-server/node_modules/firebase/lib/firebase-node.js:9:186)
at Aa (/home/symbly/www/d20-api-server/node_modules/firebase/lib/firebase-node.js:10:196)
at za (/home/symbly/www/d20-api-server/node_modules/firebase/lib/firebase-node.js:8:468)
at Da (/home/symbly/www/d20-api-server/node_modules/firebase/lib/firebase-node.js:10:392)
at G.W.update (/home/symbly/www/d20-api-server/node_modules/firebase/lib/firebase-node.js:128:318)
at TrackedObj._doSave ( EDIT: SO many typos, fixed them.