Webpack build for branch master: 4122db0275

This commit is contained in:
Travis CI 2018-01-16 00:26:37 +00:00
parent 45ff08a396
commit ac9e701a42
2 changed files with 5 additions and 5 deletions

View file

@ -999,12 +999,12 @@ class Collection extends Map {
for (const item of this.values()) {
if (item[propOrFn] === value) return item;
}
return null;
return undefined;
} else if (typeof propOrFn === 'function') {
for (const [key, val] of this) {
if (propOrFn(val, key, this)) return val;
}
return null;
return undefined;
} else {
throw new Error('First argument must be a property string or a function.');
}
@ -1030,12 +1030,12 @@ class Collection extends Map {
for (const [key, val] of this) {
if (val[propOrFn] === value) return key;
}
return null;
return undefined;
} else if (typeof propOrFn === 'function') {
for (const [key, val] of this) {
if (propOrFn(val, key, this)) return key;
}
return null;
return undefined;
} else {
throw new Error('First argument must be a property string or a function.');
}

File diff suppressed because one or more lines are too long