mirror of
https://github.com/lancedikson/bowser
synced 2024-10-27 20:34:22 +00:00
Fix travis errors
This commit is contained in:
parent
97aa1e1972
commit
e55055534f
@ -382,8 +382,7 @@ class Parser {
|
||||
|
||||
const platformMatchingDefinition = Utils.find(
|
||||
platformsAndOSNames,
|
||||
name => (this.isPlatform(name))
|
||||
);
|
||||
name => (this.isPlatform(name)));
|
||||
if (platformMatchingDefinition) {
|
||||
const platformResult = this.satisfies(platformsAndOSes[platformMatchingDefinition]);
|
||||
|
||||
|
17
src/utils.js
17
src/utils.js
@ -210,6 +210,8 @@ export default class Utils {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
return undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -246,11 +248,10 @@ export default class Utils {
|
||||
}
|
||||
for (i = 0, l = arr.length; i < l; i += 1) {
|
||||
const value = arr[i];
|
||||
if (!predicate(value, i)) {
|
||||
continue;
|
||||
}
|
||||
if (predicate(value, i)) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
@ -262,6 +263,7 @@ export default class Utils {
|
||||
* @return {Object}
|
||||
*/
|
||||
static assign(obj, ...assigners) {
|
||||
const result = obj;
|
||||
let i;
|
||||
let l;
|
||||
if (Object.assign) {
|
||||
@ -269,11 +271,12 @@ export default class Utils {
|
||||
}
|
||||
for (i = 0, l = assigners.length; i < l; i += 1) {
|
||||
const assigner = assigners[i];
|
||||
if (typeof assigner !== 'object') {
|
||||
continue;
|
||||
}
|
||||
if (typeof assigner === 'object') {
|
||||
const keys = Object.keys(assigner);
|
||||
keys.forEach(key => obj[key] = assigner[key]);
|
||||
keys.forEach((key) => {
|
||||
result[key] = assigner[key];
|
||||
});
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user