Fix: Don't use globalThis, since it won't get g.c. on window close

Don't use `globalThis`, since it won't get garbage collected on window
close.

See here for the relevant review:
https://extensions.gnome.org/review/38364
And for the relevant documentation:
https://gjs.guide/extensions/review-guidelines/review-guidelines.html#only-use-init-for-initialization
This commit is contained in:
June 2023-01-26 03:42:56 +01:00
commit 7b1c030325
No known key found for this signature in database
GPG key ID: 094C2AC34192FA11
2 changed files with 7 additions and 4 deletions

View file

@ -11,6 +11,4 @@ function buildPrefsWidget() {
}
function init() {
// Load the settings.
globalThis.settings = ExtensionUtils.getSettings();
}