Skip to content

Commit

Permalink
Merge pull request #142 from Moerill/2.15.4
Browse files Browse the repository at this point in the history
2.15.4
  • Loading branch information
Geekswordsman authored Sep 14, 2022
2 parents a9fb39b + 714ba93 commit ddabb8a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# v2.15.4
- Adjusted resolutions to #137 & #138
- Corrected an issue where refreshing selected tokens was causing a circular reference error ( [#141](https://github.com/Moerill/token-mold/issues/141) ).
- Corrected an issue where the overlay could get disabled in certain cirucmstances ( [#51](https://github.com/Moerill/token-mold/issues/51) )

# v2.15.3
- Corrected an issue where a conflict with certain game systems such as PF2E and a core Foundry v10 method that Token Mold utilizes could cause an infinite recursion error. ( Issue #138)
- Corrected an issue where overlays may not get displayed due in Foundry v10 due to deprecated data retrieval methods ( Issue #137 )
Expand Down
4 changes: 2 additions & 2 deletions module.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"url": "https://github.com/Moerill/token-mold",
"bugs": "https://github.com/Moerill/token-mold/issues",
"flags": {},
"version": "2.15.3",
"version": "2.15.4",
"minimumCoreVersion": "9",
"compatibleCoreVersion": "10",
"compatibility": {
Expand Down Expand Up @@ -67,7 +67,7 @@
"dependencies": [],
"socket": false,
"manifest": "https://raw.githubusercontent.com/Moerill/token-mold/master/module.json",
"download": "https://github.com/Moerill/token-mold/releases/download/v2.15.3/v2.15.3.zip",
"download": "https://github.com/Moerill/token-mold/releases/download/v2.15.4/v2.15.4.zip",
"protected": false,
"coreTranslation": false
}
10 changes: 7 additions & 3 deletions scripts/token-mold.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,11 @@ export default class TokenMold {
this.section
.querySelector(".token-rand-form-btn")
.addEventListener("click", (ev) => {
if (this.form === undefined) this.form = new TokenMoldForm(this);
if (this.form === undefined) {
this.form = new TokenMoldForm(this);
} else {
this.form.data = this.data;
}
this.form.render(true);
});
}
Expand Down Expand Up @@ -329,7 +333,7 @@ export default class TokenMold {
let udata = [];
for (const token of selected) {
if (TokenMold.FOUNDRY_VERSION >= 10) {
udata.push(this._setTokenData(canvas.scene, duplicate(token)));
udata.push(this._setTokenData(canvas.scene, token.document.toObject()));
} else {
udata.push(this._setTokenData(canvas.scene, duplicate(token.data)));
}
Expand Down Expand Up @@ -932,7 +936,7 @@ export default class TokenMold {
};
for (const type of types) {
const docClass = TokenMold.FOUNDRY_VERSION >= 10 ?
JSON.parse(JSON.stringify(new CONFIG.Actor.documentClass({ type: type, name: "tmp"}))) :
new CONFIG.Actor.documentClass({ type: type, name: "tmp"}).system :
new CONFIG.Actor.documentClass({ type: type, name: "tmp" }).data.data;
const { bar, value } = TokenDocument.getTrackedAttributes(docClass);
for (const val of bar) {
Expand Down

0 comments on commit ddabb8a

Please sign in to comment.