update to fix rogue null tag in wall config

This commit is contained in:
Mike Bloy 2026-05-30 15:57:46 -05:00
parent bf55f3fad8
commit 37186eecca

View File

@ -96,8 +96,11 @@ Hooks.on("renderWallConfig", async (application, element, context, options) => {
const doc = application.document;
const scope = "mb-assets";
const key = "doortile";
const defaultValue = null;
const value = doc.getFlag(scope, key) ?? defaultValue;
const defaultValue = [];
let value = doc.getFlag(scope, key) ?? defaultValue;
if (value === "null" || value === "undefined") {
value = [];
}
const name = `flags.${scope}.${key}`;
if (options.parts && !options.parts.includes("body")) return;
const dataField = new foundry.data.fields.DocumentUUIDField({