Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Complete fix for #8160, handle subclassed objects. Added test #8401
Changed all instances of checking the array to be seq instanceof Array || _.isArray(seq).
Passes all observe-sequence tests. Added a test that verifies this works for subclassed Arrays.
Also, I want to create another test that will verify it works for arrays created in a vm because that was the reason for the fix in the first place.
To add this test I need to add a vm-browserify as a node_module for
Despite the inability to add
vm tests, from what I know about the way
Array behaves in that environment, and further proven by your own testing, I'll sign off on this because the test you added should accurately catch any regression with this in the future.
I realize that's not the best answer since it fails to implement a test for the exact circumstance that caused this originally but instead tests for it "in spirit", but making the test work otherwise is currently not simple and this change is obviously important.
Just as a sanity check for what might be a change that happens in the near future: does
(I ask because Lodash is coming to Meteor and
I was able to trim down the
I ran the tests with all combinations of
Should be complete.
Thanks for taking care of this, @brucejo75! Looks good.
I made one more commit (eb45830) to fix some formatting before merging this however you didn't have a branch on your account aside from your
Alternatively, I guess you could disable "Allow contributors to make changes" when opening the PR, and then we'll just do it on our own branch instead of yours. Typically though, if you have branched it wouldn't be a problem.