From c5f58068dc116159a401ec0cc3e7fba26c4e16d7 Mon Sep 17 00:00:00 2001 From: Eddie Dover Date: Sat, 16 Mar 2024 22:14:22 -0700 Subject: [PATCH] fix: emergency hotfix for tag and new achievement issue --- src/module/app/add-achievement-form.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/module/app/add-achievement-form.js b/src/module/app/add-achievement-form.js index d51f346..e650d7d 100644 --- a/src/module/app/add-achievement-form.js +++ b/src/module/app/add-achievement-form.js @@ -37,7 +37,10 @@ export class AddAchievementForm extends FormApplication { } getData(options) { - const tagarr = JSON.parse(JSON.stringify(this.overrides.achievement.tags)); + let tagarr = this.overrides.achievement?.tags ? JSON.parse(JSON.stringify(this.overrides.achievement.tags)) : []; + if (typeof tagarr === "string") { + tagarr = tagarr.split(","); + } this.workingTags = tagarr?.join(", ") ?? ""; return mergeObject(super.getData(options), { isDM: game.user.isGM,