Prevent overwriting the global taf object

This commit is contained in:
Oliver-Akins 2024-09-29 00:18:23 -06:00
parent 4584b1a7a5
commit 4a1469ad70

View file

@ -1,11 +1,18 @@
import { hideMessageText } from "./feature_flags/rollModeMessageContent.mjs"; import { hideMessageText } from "./feature_flags/rollModeMessageContent.mjs";
globalThis.taf = Object.freeze({ Object.defineProperty(
globalThis,
`taf`,
{
value: Object.freeze({
utils: Object.freeze({ utils: Object.freeze({
hideMessageText, hideMessageText,
}), }),
FEATURES: { FEATURES: Object.preventExtensions({
ROLL_MODE_CONTENT: false, ROLL_MODE_CONTENT: false,
STORABLE_SHEET_SIZE: false, STORABLE_SHEET_SIZE: false,
}),
}),
writable: false,
}, },
}); );