Closed pixelzoom closed 4 years ago
I made this change, added a unit test and tested phet-brand aqua and everything came out clear. I'll commit momentarily.
Committed. @pixelzoom can you please review at your convenience? Should this block publication until the review is complete?
Looks good. Closing.
TinyEmitter.addListener (and therefore Emitter.addListener and Property.link) happily allows you to add a listener after it has been disposed. Not until you call
emit
will you discover your error.Example:
Shouldn't this be more robust, and detect the programming error at the
addListener
site, rather than waiting foremit
?Look like this has been the case since Emitter was first created, so assigning to the original author @samreid.