Pass negative indices over the RPC bridge rather than special-casing -1
This commit is contained in:
parent
d1248b6676
commit
741d19458b
|
@ -54,7 +54,7 @@ export function fireMutationListeners(realmId) {
|
|||
}
|
||||
|
||||
function isIndex(propertyName) {
|
||||
return typeof propertyName === 'number' || (typeof propertyName === 'string' && /^\d+$/.test(propertyName));
|
||||
return typeof propertyName === 'number' || (typeof propertyName === 'string' && /^-?\d+$/.test(propertyName));
|
||||
}
|
||||
|
||||
const mutable = Symbol('mutable');
|
||||
|
@ -123,9 +123,6 @@ export function createCollection(prototype, realmId, info, _mutable) {
|
|||
'optional': {
|
||||
get: getterForProperty('optional'),
|
||||
},
|
||||
'-1': {
|
||||
value: undefined,
|
||||
},
|
||||
});
|
||||
|
||||
collection[keys.realm] = realmId;
|
||||
|
|
Loading…
Reference in New Issue