Sonar: Check for undefined without typeof

This commit is contained in:
koloml committed 2026-10-17 05:47:22 +02:00
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;
+1 -1
View File
@@ -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