Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
renderURLFromState(state) {
const currentQueryString = this.urlUtils.readUrl();
const foreignConfig = AlgoliaSearchHelper
.getForeignConfigurationInQueryString(currentQueryString, {mapping: this.mapping});
// eslint-disable-next-line camelcase
foreignConfig.is_v = majorVersionNumber;
const qs = urlHelper.getQueryStringFromState(
state.filter(this.trackedParameters),
{
moreAttributes: foreignConfig,
mapping: this.mapping,
safe: true
}
);
if (this.timer() < this.threshold) {
this.urlUtils.replaceState(qs, {getHistoryState: this.getHistoryState});
} else {
this.urlUtils.pushState(qs, {getHistoryState: this.getHistoryState});
}
}