Make SonarCloud happier (#23699)
This commit is contained in:
parent
77d75984fa
commit
577a6b7c5a
2 changed files with 6 additions and 6 deletions
|
@ -77,16 +77,16 @@ function checkBrowserFeatures() {
|
||||||
const featureList = Object.keys(window.Modernizr);
|
const featureList = Object.keys(window.Modernizr);
|
||||||
|
|
||||||
let featureComplete = true;
|
let featureComplete = true;
|
||||||
for (let i = 0; i < featureList.length; i++) {
|
for (const feature of featureList) {
|
||||||
if (window.Modernizr[featureList[i]] === undefined) {
|
if (window.Modernizr[feature] === undefined) {
|
||||||
logger.error(
|
logger.error(
|
||||||
"Looked for feature '%s' but Modernizr has no results for this. " +
|
"Looked for feature '%s' but Modernizr has no results for this. " +
|
||||||
"Has it been configured correctly?", featureList[i],
|
"Has it been configured correctly?", feature,
|
||||||
);
|
);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (window.Modernizr[featureList[i]] === false) {
|
if (window.Modernizr[feature] === false) {
|
||||||
logger.error("Browser missing feature: '%s'", featureList[i]);
|
logger.error("Browser missing feature: '%s'", feature);
|
||||||
// toggle flag rather than return early so we log all missing features rather than just the first.
|
// toggle flag rather than return early so we log all missing features rather than just the first.
|
||||||
featureComplete = false;
|
featureComplete = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,7 +102,7 @@ const setupCompleted = (async () => {
|
||||||
|
|
||||||
const handleAction = (
|
const handleAction = (
|
||||||
action: WidgetApiAction,
|
action: WidgetApiAction,
|
||||||
handler: (request: IWidgetApiRequestData) => void,
|
handler: (request: IWidgetApiRequestData) => Promise<void>,
|
||||||
): void => {
|
): void => {
|
||||||
widgetApi.on(`action:${action}`, async (ev: CustomEvent<IWidgetApiRequest>) => {
|
widgetApi.on(`action:${action}`, async (ev: CustomEvent<IWidgetApiRequest>) => {
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
|
|
Loading…
Reference in a new issue