Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.then(query => {
let url = normalizeMockUrl(this.component.getUrl(this.props));
return extendUrl(url, { query: { ...query } });
});
}
return propsToQuery({ ...this.component.props, ...this.component.builtinProps }, this.props).then(query => {
return extendUrl(normalizeMockUrl(this.component.getUrl(this.props)), { query });
});
}
window.open = function windowOpenWrapper(url : string, name : string, options : string, last : mixed) : mixed {
const win = windowOpen.call(this, normalizeMockUrl(url), name, options, last);
if (!win) {
return win;
}
linkWindow({ win, name, domain: url ? getDomainFromUrl(url) : null });
return win;
};
}
}).then(win => {
if (!bridge || !bridge.needsBridge({ win, domain }) || bridge.hasBridge(domain, domain)) {
return;
}
const bridgeUrl = this.component.getBridgeUrl();
if (!bridgeUrl) {
throw new Error(`Bridge needed to render ${ context }`);
}
const bridgeDomain = getDomainFromUrl(bridgeUrl);
bridge.linkUrl(win, domain);
return bridge.openBridge(normalizeMockUrl(bridgeUrl), bridgeDomain);
});
}
return propsToQuery(_extends({}, this.component.props, this.component.builtinProps), this.props).then(function (query) {
var url = normalizeMockUrl(_this5.component.getUrl(_this5.props));
return extendUrl(url, { query: _extends({}, query) });
});
};