Skip to content

Commit

Permalink
Fix: migrations are again persistent
Browse files Browse the repository at this point in the history
There was a problem getting the updateData with `.toObject()` from the modified actor.
When modifying the actor inplace without calling `.update(...)` the actor source (the Document DataSource) is not updated, and `.toObject()` returns the old `actor.system`.
  • Loading branch information
Eryx5502 committed Feb 7, 2024
1 parent 90c94fe commit fc496bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/module/migration/migrate.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ async function migrateAllActors(migration) {

for (const actor of actors) {
console.log(`AnimaBF | Migrating actor ${actor.name} (${actor.id}).`);
const updateData = (await migration.updateActor(actor)).toObject();
const updateData = (await migration.updateActor(actor)).system;
await actor.update(updateData);
}

Expand Down

0 comments on commit fc496bb

Please sign in to comment.