mirror of
https://github.com/status-im/realm-js.git
synced 2025-02-18 17:47:32 +00:00
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) {
|
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');
|
const mutable = Symbol('mutable');
|
||||||
@ -123,9 +123,6 @@ export function createCollection(prototype, realmId, info, _mutable) {
|
|||||||
'optional': {
|
'optional': {
|
||||||
get: getterForProperty('optional'),
|
get: getterForProperty('optional'),
|
||||||
},
|
},
|
||||||
'-1': {
|
|
||||||
value: undefined,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
collection[keys.realm] = realmId;
|
collection[keys.realm] = realmId;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user