Skip to content

Commit

Permalink
Fixed error of judgment whether to load
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederisk committed Sep 9, 2021
1 parent 5058489 commit 04d7373
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@
"**/node_modules": true,
"dist": true
},
"typescript.tsdk": "./node_modules/typescript/lib"
"typescript.tsdk": "./node_modules/typescript/lib",
"cSpell.words": [
"Portlet"
]
}
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

/* eslint-disable @typescript-eslint/naming-convention */
jQuery.when(window.mw.loader.using('mediawiki.util'), $.ready).then((): void => {
if (!mw.config.get("wgIsProbablyEditable") || !($('#ca-viewsource').length > 0)) {
if (!(mw.config.get("wgIsProbablyEditable") || ($('#ca-viewsource').length > 0))) {
return undefined;
}

Expand Down

0 comments on commit 04d7373

Please sign in to comment.