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
@ -381,9 +381,8 @@ class Parser {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const platformMatchingDefinition = Utils.find(
|
const platformMatchingDefinition = Utils.find(
|
||||||
platformsAndOSNames,
|
platformsAndOSNames,
|
||||||
name => (this.isPlatform(name))
|
name => (this.isPlatform(name)));
|
||||||
);
|
|
||||||
if (platformMatchingDefinition) {
|
if (platformMatchingDefinition) {
|
||||||
const platformResult = this.satisfies(platformsAndOSes[platformMatchingDefinition]);
|
const platformResult = this.satisfies(platformsAndOSes[platformMatchingDefinition]);
|
||||||
|
|
||||||
|
21
src/utils.js
21
src/utils.js
@ -210,6 +210,8 @@ export default class Utils {
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -244,12 +246,11 @@ export default class Utils {
|
|||||||
if (Array.prototype.find) {
|
if (Array.prototype.find) {
|
||||||
return Array.prototype.find.call(arr, predicate);
|
return Array.prototype.find.call(arr, predicate);
|
||||||
}
|
}
|
||||||
for (i = 0, l = arr.length; i < l; i+=1) {
|
for (i = 0, l = arr.length; i < l; i += 1) {
|
||||||
const value = arr[i];
|
const value = arr[i];
|
||||||
if (!predicate(value, i)) {
|
if (predicate(value, i)) {
|
||||||
continue;
|
return value;
|
||||||
}
|
}
|
||||||
return value;
|
|
||||||
}
|
}
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
@ -262,18 +263,20 @@ export default class Utils {
|
|||||||
* @return {Object}
|
* @return {Object}
|
||||||
*/
|
*/
|
||||||
static assign(obj, ...assigners) {
|
static assign(obj, ...assigners) {
|
||||||
|
const result = obj;
|
||||||
let i;
|
let i;
|
||||||
let l;
|
let l;
|
||||||
if (Object.assign) {
|
if (Object.assign) {
|
||||||
return Object.assign(obj, ...assigners);
|
return Object.assign(obj, ...assigners);
|
||||||
}
|
}
|
||||||
for (i = 0, l = assigners.length; i < l; i+=1) {
|
for (i = 0, l = assigners.length; i < l; i += 1) {
|
||||||
const assigner = assigners[i];
|
const assigner = assigners[i];
|
||||||
if (typeof assigner !== 'object') {
|
if (typeof assigner === 'object') {
|
||||||
continue;
|
const keys = Object.keys(assigner);
|
||||||
|
keys.forEach((key) => {
|
||||||
|
result[key] = assigner[key];
|
||||||
|
});
|
||||||
}
|
}
|
||||||
const keys = Object.keys(assigner);
|
|
||||||
keys.forEach(key => obj[key] = assigner[key]);
|
|
||||||
}
|
}
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user