Skip to content
Snippets Groups Projects
Commit 9aa21c34 authored by Jimmy's avatar Jimmy
Browse files

Constants loader attach setter to provide no-op

parent f88eb62e
No related branches found
No related tags found
No related merge requests found
......@@ -20,10 +20,17 @@ var ConstantsLoader = (() => {
} else if (allowedTypes.includes(typeof value)) {
/* A value type, ready for getter conversion. */
Object.defineProperty(fragment, key, {
set() {
if (!V.debug) return;
Errors.report("A modification of a constant was attempted.", {
key,
value,
fragment,
});
},
get() {
return value;
},
writable: false,
configurable: false,
});
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment