Minor syntax improvements to JS shim
This commit is contained in:
parent
8ee6e757ee
commit
44eea1e036
|
@ -128,7 +128,7 @@ function serialize(realmId, value) {
|
||||||
throw new Error('Unable to serialize value from another Realm');
|
throw new Error('Unable to serialize value from another Realm');
|
||||||
}
|
}
|
||||||
|
|
||||||
return {id: id};
|
return {id};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Array.isArray(value)) {
|
if (Array.isArray(value)) {
|
||||||
|
|
|
@ -7,8 +7,8 @@ let resizeListKey = exports.resizeListKey = Symbol();
|
||||||
exports.createList = createList;
|
exports.createList = createList;
|
||||||
|
|
||||||
function createList(prototype, getterForLength, getterForIndex, setterForIndex) {
|
function createList(prototype, getterForLength, getterForIndex, setterForIndex) {
|
||||||
var list = prototype ? Object.create(prototype) : {};
|
let list = prototype ? Object.create(prototype) : {};
|
||||||
var size = 0;
|
let size = 0;
|
||||||
|
|
||||||
Object.defineProperty(list, 'length', {get: getterForLength});
|
Object.defineProperty(list, 'length', {get: getterForLength});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue