mirror of
https://github.com/koloml/philomena-tagging-assistant.git
synced 2026-11-07 16:18:19 +00:00
Sonar: Check for undefined without typeof
This commit is contained in:
1 parent
304c824045
commit
05349feafc
2 files changed
+2
-2
No files matched your search
@@ -412,7 +412,7 @@ export class FullscreenViewer extends BaseComponent {
|
||||
}
|
||||
|
||||
#togglePopupVisibility(maybeState: boolean | undefined = undefined) {
|
||||
if (typeof maybeState === 'undefined') {
|
||||
if (maybeState === undefined) {
|
||||
const isHidden = this.#tagsPopupElement.classList.toggle(FullscreenViewer.#collapsedPopupState);
|
||||
void FullscreenViewer.#preferences.fullscreenViewerPopupShown.set(!isHidden);
|
||||
return;
|
||||
|
||||
@@ -38,7 +38,7 @@ amdLite.define = (name, dependencies, originalCallback) => {
|
||||
|
||||
// Workaround for the entry script not returning anything causing AMD-Lite to send warning about modules not
|
||||
// being loaded/not existing.
|
||||
return typeof callbackResult !== 'undefined' ? callbackResult : {};
|
||||
return callbackResult !== undefined ? callbackResult : {};
|
||||
});
|
||||
|
||||
// Schedule the auto run on the next available frame. Firefox and Chromium have a lot of differences in how they
|
||||
|
||||
Reference in new issue
Block a user