-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError exception on array comparison #85
Comments
@miyconst could you please take a look? |
Sure. |
@febeling, could you please provide your full testing environment? And could you try to replace return Array.apply(null, { length: obj.length }).map(function (e, i, a) { return i.toString(); }); at https://github.com/Starcounter-Jack/JSON-Patch/blob/master/src/json-patch-duplex.js#L29 with var keys = new Array(obj.length);
for (var i = 0; i < keys.length; i++) {
keys[i] = i.toString();
}
return keys; And let me know whether it passes. |
The tests are written with jasmine and run in karma, controlling a phantomjs browser runtime. I can't reproduce the problem in plain node. The problem goes away when switching karma to use Chrome as browser runtime. With the change to loop iteration you propose above it also works with phantomjs. |
Should be fixed in 0.5.6 |
Confirming the fix. Thanks! |
This test passes with 0.5.4 and fails with 0.5.5
This is the stacktrace:
Updated: showing tests exercising the library API directly, instead of our thin service layer.
The text was updated successfully, but these errors were encountered: