Skip to content

Commit

Permalink
Release 2.0.3.
Browse files Browse the repository at this point in the history
  • Loading branch information
Fyorl committed Sep 21, 2022
1 parent 55c0a99 commit f2c7c99
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions module/migration.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ export const getMigrationData = async function() {
* @private
*/
function _migrateActorMovement(actorData, updateData) {
const attrs = actorData.system.attributes || {};
const attrs = actorData.system?.attributes || {};

// Work is needed if old data is present
const old = actorData.type === "vehicle" ? attrs.speed : attrs.speed?.value;
Expand Down Expand Up @@ -440,7 +440,7 @@ function _migrateActorMovement(actorData, updateData) {
* @private
*/
function _migrateActorSenses(actor, updateData) {
const oldSenses = actor.system.traits?.senses;
const oldSenses = actor.system?.traits?.senses;
if ( oldSenses === undefined ) return;
if ( typeof oldSenses !== "string" ) return;

Expand Down Expand Up @@ -480,7 +480,7 @@ function _migrateActorSenses(actor, updateData) {
* @private
*/
function _migrateActorType(actor, updateData) {
const original = actor.system.details?.type;
const original = actor.system?.details?.type;
if ( typeof original !== "string" ) return;

// New default data structure
Expand Down Expand Up @@ -511,7 +511,7 @@ function _migrateActorType(actor, updateData) {
actorTypeData.subtype = match.groups.subtype?.trim().titleCase() || "";

// Match a swarm
const isNamedSwarm = actor.name.startsWith(game.i18n.localize("DND5E.CreatureSwarm"));
const isNamedSwarm = actor.name?.startsWith(game.i18n.localize("DND5E.CreatureSwarm"));
if ( match.groups.size || isNamedSwarm ) {
const sizeLc = match.groups.size ? match.groups.size.trim().toLowerCase() : "tiny";
const sizeMatch = Object.entries(CONFIG.DND5E.actorSizes).find(([k, v]) => {
Expand Down
6 changes: 3 additions & 3 deletions system.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
"id": "dnd5e",
"title": "DnD5e - Fifth Edition System",
"description": "A system for playing the fifth edition of the worlds most popular role-playing game in the Foundry Virtual Tabletop environment.",
"version": "2.0.2",
"version": "2.0.3",
"compatibility": {
"minimum": "10",
"verified": "10",
"maximum": "10"
},
"url": "https://github.com/foundryvtt/dnd5e/",
"manifest": "https://raw.githubusercontent.com/foundryvtt/dnd5e/master/system.json",
"download": "https://github.com/foundryvtt/dnd5e/releases/download/release-2.0.2/dnd5e-release-2.0.2.zip",
"download": "https://github.com/foundryvtt/dnd5e/releases/download/release-2.0.3/dnd5e-release-2.0.3.zip",
"authors": [
{
"name": "Atropos",
Expand Down Expand Up @@ -132,7 +132,7 @@
"primaryTokenAttribute": "attributes.hp",
"secondaryTokenAttribute": null,
"flags": {
"needsMigrationVersion": "2.0.0",
"needsMigrationVersion": "2.0.2",
"compatibleMigrationVersion": "0.8"
}
}

0 comments on commit f2c7c99

Please sign in to comment.