Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const params = new SkyAppRuntimeConfigParams(
currentUrl,
this.config.params!
);
const ensureContextArgs: BBContextArgs = {
envId: params.get('envid'),
envIdRequired: params.isRequired('envid'),
leId: params.get('leid'),
leIdRequired: params.isRequired('leid'),
svcId: params.get('svcid'),
svcIdRequired: params.isRequired('svcid'),
url: currentUrl
};
return BBContextProvider.ensureContext(ensureContextArgs)
.then((args) => {
// The URL will remain the same if the required context is already present, in which
// case there's no need to update the URL.
if (args.url !== currentUrl) {
history.replaceState(
{},
'',
args.url
);
}
});
});
} else {