Closed amccloud closed 9 years ago
Very good. This seems to be a logical error, and should affect every browser. Good catch and thanks for fixing. Should probably have test for this causeing https://github.com/amccloud/immstruct/blob/patch-1/src/structure.js#L65-L70 to fail.
Do you already have a working test-case (the code which triggered this error on your side) which you can do as a test?
I do not have a test case. The issue only happens in IE8 for me.
At a glance my code is doing something very simple.
immstruct = require 'immstruct'
structure = immstruct(messages: [])
structure.reference().cursor()
This might also be due to forEach
or are you using a polyfill?
I'm using a polyfill (es5-shim)
Edit: the key when it fails is forEach
even though listeners is []
I merged this even though there are no tests and it's not entirely "closed", but it is an obvious logical error.
Edit: the key when it fails is forEach even though listeners is []
What do you mean by this?
Return causes
listListenerMatching
to return early withundefined
. I believe the intention is to just ignore prototype properties.