From dbb975c57f9ce76f550c2a9b806fab477fbd0e0b Mon Sep 17 00:00:00 2001 From: "flamingo[bot]" <277372822+flamingo[bot]@users.noreply.github.com> Date: Mon, 14 Sep 2026 05:14:23 +0000 Subject: [PATCH] fix(MESHAGEN-009): require('promise') hoisted as local var reused across branches without inline pattern violation but note stray global leak --- modules/power-monitor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/power-monitor.js b/modules/power-monitor.js index 72faac935..e8097669c 100644 --- a/modules/power-monitor.js +++ b/modules/power-monitor.js @@ -179,7 +179,7 @@ function powerMonitor() this.sleepDisplay = function sleepDispay(force) { var promise = require('promise'); - p = new promise(function (res, rej) { this._res = res; this._rej = rej; }); + var p = new promise(function (res, rej) { this._res = res; this._rej = rej; }); switch (process.platform) { @@ -229,7 +229,7 @@ function powerMonitor() this.wakeDisplay = function wakeDisplay() { var promise = require('promise'); - p = new promise(function (res, rej) { this._res = res; this._rej = rej; }); + var p = new promise(function (res, rej) { this._res = res; this._rej = rej; }); switch(process.platform) { case 'darwin':