Skip to content

Commit

Permalink
[#2627] Fix migrated source field being deleted under some circumstan…
Browse files Browse the repository at this point in the history
…ces.
  • Loading branch information
Fyorl committed Dec 5, 2023
1 parent e4c25b4 commit 0521681
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion module/data/item/templates/item-description.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default class ItemDescriptionTemplate extends SystemDataModel {
* @param {object} source The candidate source data from which the model will be constructed.
*/
static #migrateSource(source) {
if ( foundry.utils.getType(source.source) !== "Object" ) {
if ( ("source" in source) && (foundry.utils.getType(source.source) !== "Object") ) {
source.source = { custom: source.source };
}
}
Expand Down

0 comments on commit 0521681

Please sign in to comment.