@applitools/visual-grid-client
Advanced tools
Comparing version 5.3.1 to 5.3.2
{ | ||
"name": "@applitools/visual-grid-client", | ||
"version": "5.3.1", | ||
"version": "5.3.2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "src/visual-grid-client.js", |
@@ -8,2 +8,10 @@ 'use strict'; | ||
function assignWithoutOverride(obj1, obj2) { | ||
for (const p in obj2) { | ||
if (!obj1[p]) { | ||
obj1[p] = obj2[p]; | ||
} | ||
} | ||
} | ||
function fromCacheToRGridResource({url, type, hash, content}) { | ||
@@ -68,3 +76,3 @@ const resource = new RGridResource(); | ||
if (cacheEntry) { | ||
Object.assign(resources, mapValues(cacheEntry, fromCacheToRGridResource)); | ||
assignWithoutOverride(resources, mapValues(cacheEntry, fromCacheToRGridResource)); | ||
} else if (/^https?:$/i.test(new URL(url).protocol)) { | ||
@@ -78,3 +86,3 @@ missingResourceUrls.push(url); | ||
fetchResource(url) | ||
.then(async resource => Object.assign(resources, await processResource(resource))) | ||
.then(async resource => assignWithoutOverride(resources, await processResource(resource))) | ||
.catch(ex => { | ||
@@ -81,0 +89,0 @@ logger.log(`error fetching resource at ${url}: ${ex}`); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
75208
1994