Pass negative indices over the RPC bridge rather than special-casing -1

This commit is contained in:
Thomas Goyne 2017-09-26 12:51:55 -07:00
parent d1248b6676
commit 741d19458b
1 changed files with 1 additions and 4 deletions

View File

@ -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;