update to fix rogue null tag in wall config
This commit is contained in:
parent
bf55f3fad8
commit
37186eecca
@ -96,8 +96,11 @@ Hooks.on("renderWallConfig", async (application, element, context, options) => {
|
|||||||
const doc = application.document;
|
const doc = application.document;
|
||||||
const scope = "mb-assets";
|
const scope = "mb-assets";
|
||||||
const key = "doortile";
|
const key = "doortile";
|
||||||
const defaultValue = null;
|
const defaultValue = [];
|
||||||
const value = doc.getFlag(scope, key) ?? defaultValue;
|
let value = doc.getFlag(scope, key) ?? defaultValue;
|
||||||
|
if (value === "null" || value === "undefined") {
|
||||||
|
value = [];
|
||||||
|
}
|
||||||
const name = `flags.${scope}.${key}`;
|
const name = `flags.${scope}.${key}`;
|
||||||
if (options.parts && !options.parts.includes("body")) return;
|
if (options.parts && !options.parts.includes("body")) return;
|
||||||
const dataField = new foundry.data.fields.DocumentUUIDField({
|
const dataField = new foundry.data.fields.DocumentUUIDField({
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user