From 25ffc2b9e88ae4ba1003099588c9f371e62ed5c0 Mon Sep 17 00:00:00 2001 From: Cody Swendrowski Date: Mon, 30 Nov 2020 15:59:06 -0600 Subject: [PATCH] Fix infinite tab bug (Thanks Ard!). Move repo under maintenance team --- module.json | 16 ++++++++-------- modules/ItemSheet.js | 11 +++++------ 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/module.json b/module.json index 12a8256..401a09b 100644 --- a/module.json +++ b/module.json @@ -9,16 +9,16 @@ "url": "https://www.patreon.com/foundryworkshop" } ], - "version": "0.2.3", + "version": "0.2.4", "minimumCoreVersion": "0.6.0", - "compatibleCoreVersion": "0.7.0", + "compatibleCoreVersion": "0.7.7", "url": "https://github.com/Forien/foundryvtt-forien-unidentified-items", - "manifest": "https://raw.githubusercontent.com/Forien/foundryvtt-forien-unidentified-items/master/module.json", - "download": "https://github.com/Forien/foundryvtt-forien-unidentified-items/releases/download/v0.2.3/v0.2.3.zip", - "readme": "https://github.com/Forien/foundryvtt-forien-unidentified-items/blob/v0.2.3/README.md", - "changelog": "https://github.com/Forien/foundryvtt-forien-unidentified-items/blob/v0.2.3/changelog.md", - "bugs": "https://github.com/Forien/foundryvtt-forien-unidentified-items/issues", - "wiki": "https://github.com/Forien/foundryvtt-forien-unidentified-items/wiki", + "manifest": "https://raw.githubusercontent.com/League-of-Foundry-Developers/foundryvtt-forien-unidentified-items/master/module.json", + "download": "https://github.com/League-of-Foundry-Developers/foundryvtt-forien-unidentified-items/releases/download/v0.2.4/v0.2.4.zip", + "readme": "https://github.com/League-of-Foundry-Developers/foundryvtt-forien-unidentified-items/blob/v0.2.4/README.md", + "changelog": "https://github.com/League-of-Foundry-Developers/foundryvtt-forien-unidentified-items/blob/v0.2.4/changelog.md", + "bugs": "https://github.com/League-of-Foundry-Developers/foundryvtt-forien-unidentified-items/issues", + "wiki": "https://github.com/League-of-Foundry-Developers/foundryvtt-forien-unidentified-items/wiki", "languages": [ { "lang": "en", diff --git a/modules/ItemSheet.js b/modules/ItemSheet.js index 30e07bc..c4a67b0 100644 --- a/modules/ItemSheet.js +++ b/modules/ItemSheet.js @@ -15,6 +15,11 @@ function getItemSheetClass(cls, sheet) { const ItemClass = class extends ParentClass { + constructor(...args) { + super(...args); + this.name = sheet.split(".")[1]; + } + /** * Adds `[Mystified]` to the windows title if item is Mystified * Adds `[Original]` to the windows title if item is Original @@ -109,11 +114,5 @@ function getItemSheetClass(cls, sheet) { } }; - let sheetName = sheet.split('.'); - sheetName = sheetName[1]; - - // Because FireFox is stupid - Object.defineProperty(ItemClass, 'name', {value: sheetName}); - return ItemClass; }