Skip to content

Commit

Permalink
Fix bug in actor create that prevented duplication.
Browse files Browse the repository at this point in the history
  • Loading branch information
mcglincy committed Jan 18, 2023
1 parent 05142ed commit ec876fb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# 1.0.1

- Fix system.json for v10 warnings.
- Fix bug in actor create that prevented duplication.

# 1.0.0

Expand Down
4 changes: 2 additions & 2 deletions module/actor/actor.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { d20Formula } from "../utils.js";
export class FSActor extends Actor {
/** @override */
static async create(data, options = {}) {
data.token = data.token || {};
data.prototypeToken = data.prototypeToken || {};
let defaults = {};
if (data.type === "character") {
defaults = {
Expand All @@ -27,7 +27,7 @@ export class FSActor extends Actor {
vision: true,
};
}
mergeObject(data.token, defaults, { overwrite: false });
mergeObject(data.prototypeToken, defaults, { overwrite: false });
return super.create(data, options);
}

Expand Down

0 comments on commit ec876fb

Please sign in to comment.