From a21ecafbc653ae0ac338003ac6cefc084b8b9de0 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Wed, 25 Aug 2021 10:48:50 -0400 Subject: [PATCH] Improve reliability of set-constant scriptlet Related issue: - https://github.com/uBlockOrigin/uBlock-issues/issues/1694 --- assets/resources/scriptlets.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/assets/resources/scriptlets.js b/assets/resources/scriptlets.js index 5655298df..be3ad701b 100644 --- a/assets/resources/scriptlets.js +++ b/assets/resources/scriptlets.js @@ -924,7 +924,9 @@ const odesc = Object.getOwnPropertyDescriptor(owner, prop); let prevGetter, prevSetter; if ( odesc instanceof Object ) { - if ( odesc.configurable === false ) { return; } + if ( odesc.configurable === false ) { + owner[prop] = cValue; + } if ( odesc.get instanceof Function ) { prevGetter = odesc.get; }