Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_getStorefrontBoxedQuery(type, url, params) {
let payload;
let fastboot = this.get('fastboot');
let isFastboot = fastboot && fastboot.get('isFastBoot');
let shoebox = fastboot && fastboot.get('shoebox');
let box = shoebox && shoebox.retrieve('ember-data-storefront');
if (!isFastboot && box && box.queries && Object.keys(box.queries).length > 0) {
let key = shoeboxize(cacheKey([type, url.replace(/^.*\/\/[^\/]+/, ''), params]));
payload = box.queries[key];
delete box.queries[key];
}
return payload;
}