Compare commits
7 commits
99a2522d50
...
2515d61f80
Author | SHA1 | Date | |
---|---|---|---|
2515d61f80 | |||
29ae73465b | |||
f7a8c99f30 | |||
f653542985 | |||
9aa6d027e9 | |||
820d7387a6 | |||
77fe22436e |
1 changed files with 4 additions and 4 deletions
|
@ -20,14 +20,14 @@ import { getGame } from "../utils/utils.js";
|
|||
* @returns {Promise<void>} A promise that resolves once the migration is complete
|
||||
*/
|
||||
export async function migrateCollection(collection, migrateDocument) {
|
||||
const { documentType } = collection.constructor;
|
||||
const { documentName } = collection.constructor;
|
||||
for (const document of collection) {
|
||||
logger.info(`Migrating ${documentType} document ${document.name} (${item.id})`);
|
||||
logger.info(`Migrating ${documentName} document ${document.name} (${document.id})`);
|
||||
try {
|
||||
await migrateDocument(document);
|
||||
} catch (err) {
|
||||
logger.error(
|
||||
`Error during migration of ${documentType} document ${document.name} (${document.id}), continuing anyways.`,
|
||||
`Error during migration of ${documentName} document ${document.name} (${document.id}), continuing anyways.`,
|
||||
err,
|
||||
);
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ export function getSceneMigrator(migrateActor) {
|
|||
return async (scene) => {
|
||||
if (migrateActor) {
|
||||
for (const token of scene.tokens) {
|
||||
if (!token.actorLink) {
|
||||
if (!token.actorLink && token.actor) {
|
||||
await migrateActor(token.actor);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue