Skip to content

Commit

Permalink
Make SonarCloud happier (#23699)
Browse files Browse the repository at this point in the history
  • Loading branch information
t3chguy authored Nov 4, 2022
1 parent 77d7598 commit 577a6b7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/vector/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,16 @@ function checkBrowserFeatures() {
const featureList = Object.keys(window.Modernizr);

let featureComplete = true;
for (let i = 0; i < featureList.length; i++) {
if (window.Modernizr[featureList[i]] === undefined) {
for (const feature of featureList) {
if (window.Modernizr[feature] === undefined) {
logger.error(
"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;
}
if (window.Modernizr[featureList[i]] === false) {
logger.error("Browser missing feature: '%s'", featureList[i]);
if (window.Modernizr[feature] === false) {
logger.error("Browser missing feature: '%s'", feature);
// toggle flag rather than return early so we log all missing features rather than just the first.
featureComplete = false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/vector/jitsi/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ const setupCompleted = (async () => {

const handleAction = (
action: WidgetApiAction,
handler: (request: IWidgetApiRequestData) => void,
handler: (request: IWidgetApiRequestData) => Promise<void>,
): void => {
widgetApi.on(`action:${action}`, async (ev: CustomEvent<IWidgetApiRequest>) => {
ev.preventDefault();
Expand Down

0 comments on commit 577a6b7

Please sign in to comment.