From 44eea1e036a9a359ec2013f0ccffde1f71d05f59 Mon Sep 17 00:00:00 2001 From: Scott Kyle Date: Wed, 14 Oct 2015 16:05:49 -0700 Subject: [PATCH] Minor syntax improvements to JS shim --- lib/rpc.js | 2 +- lib/util.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/rpc.js b/lib/rpc.js index 7bf4f65f..269f9f91 100644 --- a/lib/rpc.js +++ b/lib/rpc.js @@ -128,7 +128,7 @@ function serialize(realmId, value) { throw new Error('Unable to serialize value from another Realm'); } - return {id: id}; + return {id}; } if (Array.isArray(value)) { diff --git a/lib/util.js b/lib/util.js index bd18c4ba..51f21445 100644 --- a/lib/util.js +++ b/lib/util.js @@ -7,8 +7,8 @@ let resizeListKey = exports.resizeListKey = Symbol(); exports.createList = createList; function createList(prototype, getterForLength, getterForIndex, setterForIndex) { - var list = prototype ? Object.create(prototype) : {}; - var size = 0; + let list = prototype ? Object.create(prototype) : {}; + let size = 0; Object.defineProperty(list, 'length', {get: getterForLength});