immu
immu copied to clipboard
Errors Not Thrown on Array.Push
First, thanks for the library. I love that it throws error so I can watch my tests fail.
I'm having an issue with the following snippet:
var arr = immu([])
arr.push('one'); // Does not throw an error (array does not update)
var obj = immu({});
obj.key = 'val'; // Throws an error (object does not update)
Trying to mutate an object runs as expected. The object does not get updated and an error is thrown.
Trying to mutate an array doesn't update the array, but it doesn't throw an error.
Is this expected behavior? Thanks!