Skip to content

Commit 3d0fa1c

Browse files
committed
refactor: use globalThis instead of window for location.reload
Replace window.location.reload() with globalThis.location.reload() for consistency with modern JavaScript best practices. All window references should use globalThis for better cross-environment compatibility. SonarQube: Addresses javascript:S7764
1 parent 87e6f9a commit 3d0fa1c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

internal/assets/web/static/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ const FormHandler = {
475475

476476
// Trigger config refresh and reload
477477
document.body.dispatchEvent(new CustomEvent('configChanged'));
478-
window.location.reload();
478+
globalThis.location.reload();
479479

480480
} catch (error) {
481481
UIManager.showErrorMessage(error.message);

web/static/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ const FormHandler = {
475475

476476
// Trigger config refresh and reload
477477
document.body.dispatchEvent(new CustomEvent('configChanged'));
478-
window.location.reload();
478+
globalThis.location.reload();
479479

480480
} catch (error) {
481481
UIManager.showErrorMessage(error.message);

0 commit comments

Comments
 (0)