Update upgrade.js

This commit is contained in:
Mitchell McCaffrey 2021-06-25 21:29:03 +10:00
parent 9e8898f769
commit 33d512e7b8

View File

@ -514,7 +514,7 @@ export const versions = {
resolution,
});
}
if (map.thumbnail) {
assets.push({
id: uuid(),
owner: map.owner,
@ -526,6 +526,7 @@ export const versions = {
prevType: "mapThumbnail",
});
}
}
maps = null;
await tx.table("assets").bulkAdd(assets);
assets = null;
@ -557,6 +558,7 @@ export const versions = {
prevId: token.id,
prevType: "token",
});
if (token.thumbnail) {
assets.push({
id: uuid(),
owner: token.owner,
@ -568,6 +570,7 @@ export const versions = {
prevType: "tokenThumbnail",
});
}
}
tokens = null;
await tx.table("assets").bulkAdd(assets);
assets = null;