From 5695199b5a48a292702a588dc916bd29e92b1cfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maur=C3=ADcio=20Szabo?= Date: Thu, 10 Jul 2025 22:57:32 -0300 Subject: [PATCH] Fix stylesheet watcher --- src/theme-manager.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/theme-manager.js b/src/theme-manager.js index 5ef1f0428f..c1629a2c4a 100644 --- a/src/theme-manager.js +++ b/src/theme-manager.js @@ -248,15 +248,9 @@ module.exports = class ThemeManager { // is to determine its real path (without symlinks) before we start the // watcher. let realStylesheetPath = fs.realpathSync(userStylesheetPath); - let realStylesheetDirectory = path.dirname(realStylesheetPath); - this.userStylesheetSubscription = await watcher.watchPath(realStylesheetDirectory, {}, (events) => { - for (const event of events) { - if (event.path === realStylesheetPath) { - this.reloadStylesheet(); - break; - } - } + this.userStylesheetSubscription = await watcher.watchPath(realStylesheetPath, {}, () => { + this.reloadStylesheet(); }); } catch (error) { let message = `