Skip to content

Commit 5e1f3bf

Browse files
committed
relax comparision against length
1 parent 7fed296 commit 5e1f3bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/jsonpatcherproxy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ const JSONPatcherProxy = (function() {
134134
} else {
135135
if (Array.isArray(target) && !Number.isInteger(+key.toString())) {
136136
/* array props (as opposed to indices) don't emit any patches, to avoid needless `length` patches */
137-
if(key.toString() !== 'length') {
137+
if(key != 'length') {
138138
console.warn('JSONPatcherProxy noticed a non-integer prop was set for an array. This will not emit a patch');
139139
}
140140
return Reflect.set(target, key, newValue);

0 commit comments

Comments
 (0)