Apply more let/const transforms.

This commit is contained in:
John-David Dalton
2017-01-08 23:38:19 -08:00
parent ca9e6fa087
commit 4d0c15b49e
115 changed files with 621 additions and 613 deletions

View File

@@ -34,8 +34,8 @@ import toKey from './_toKey.js';
function result(object, path, defaultValue) {
path = castPath(path, object);
var index = -1,
length = path.length;
let index = -1;
let length = path.length;
// Ensure the loop is entered when path is empty.
if (!length) {
@@ -43,7 +43,7 @@ function result(object, path, defaultValue) {
object = undefined;
}
while (++index < length) {
var value = object == null ? undefined : object[toKey(path[index])];
let value = object == null ? undefined : object[toKey(path[index])];
if (value === undefined) {
index = length;
value = defaultValue;