From ecb8dadde5af8b442f60204585b9ac680edfb822 Mon Sep 17 00:00:00 2001 From: tylerjenningsw Date: Sun, 25 Oct 2026 14:17:41 -0400 Subject: [PATCH] Expressions: an expression can't delete or redefine thisLayer, thisComp or the other unqualified names --- crates/expr/src/prelude.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/expr/src/prelude.js b/crates/expr/src/prelude.js index 06757ec79..5671d3ec2 100644 --- a/crates/expr/src/prelude.js +++ b/crates/expr/src/prelude.js @@ -1056,11 +1056,11 @@ Markers.prototype = { // --------------------------------------------------------------------------------------------- // Unqualified names: thisLayer / thisProperty attributes and the `this*` objects. They're // accessors on the global object; assigning one (`var width = 10`) shadows it for the current -// evaluation only. +// evaluation only. They can't be deleted or redefined, so an expression can't take one away from +// the evaluations after it. function __global(name, get) { Object.defineProperty(globalThis, name, { - configurable: true, get: function () { return name in __S.vars ? __S.vars[name] : get(); }, set: function (v) { __S.vars[name] = v; }, });