Closed ArvinJA closed 5 years ago
I dont know what to do with that, people just keep assigning undefined in fields. If you assign undefined in numberic fields you'll get NaN , not 0 . Here is the same problem.
I dont know whether to accept it or to add one "console.log" that tells people not to do that.
In my case I didn't define anything as "undefined", but "group" happened to be undefined. I think it won't hurt to be able to handle all sorts of "not set" cases, not just null
.
It cant happen, i put null in DisplayObject prototype. I'll accept this PR nevertheless because its not the first time people do that.
"It can't happen" is a pretty strong statement when it comes to code. I didn't have that many moving parts, I never defined anything as undefined
myself. Yet, I ended up with an undefined value. You can of course choose to not believe me, I am just saying what happened for me and why. ¯_(ツ)_/¯
Hopefully this patch solves the same problem for someone else
I think I merged it yesterday.,.. Sorry for snail speed ;)
Remember that both "null" and "undefined" exist, I get why one would want to do extra strict comparisons, but in this particular case, we don't want to call methods on an undefined object (I ran into this problem).