I'm having an issue for _some_ of the characters in one of the D&D 4th Ed campaigns I'm in when their bar 3 is linked to the HP attribute (I like red for HP). I have an API event: on("change:graphic", function(obj, prev) that gets called 4 times when I modify the red circle for bar 3. In my testing, I've been doing -1 and +1. I'm trying to understand why it gets called 4 times, but the real problem is that one of those times, bar3_value and its previous counterpart are undefined. I do a parseInt and then check against NaN, but when I log the value, I still see NaN. The code looks roughly like this: var hpValStr = obj.get("bar3_value"); var hpVal = parseInt(hpValStr); if (hpVal !== NaN)
{ log(hpVal);
} My output usually looks something like this: 33 NaN 33 33 Any insight here? My temporary solution was to remove the link between Bar3 and HP. The event only gets called called 1 time and with no error. If you'd like, I can post the firebase error.