mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-17 23:49:02 +01:00
Using foundry's isNewer function rather than custom one
This commit is contained in:
parent
482adabae4
commit
9b332c3681
3 changed files with 4 additions and 17 deletions
|
|
@ -1,10 +1,8 @@
|
|||
import { versionCompare } from '../helpers/utils.mjs';
|
||||
|
||||
export async function runMigrations() {
|
||||
let lastMigrationVersion = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.LastMigrationVersion);
|
||||
if (!lastMigrationVersion) lastMigrationVersion = '1.0.6';
|
||||
|
||||
if (versionCompare(lastMigrationVersion, '1.1.0')) {
|
||||
if (foundry.utils.isNewerVersion('1.1.0', lastMigrationVersion)) {
|
||||
const compendiumActors = [];
|
||||
for (let pack of game.packs) {
|
||||
const documents = await pack.getDocuments();
|
||||
|
|
@ -37,7 +35,7 @@ export async function runMigrations() {
|
|||
lastMigrationVersion = '1.1.0';
|
||||
}
|
||||
|
||||
if (versionCompare(lastMigrationVersion, '1.1.1')) {
|
||||
if (foundry.utils.isNewerVersion('1.1.1', lastMigrationVersion)) {
|
||||
const compendiumClasses = [];
|
||||
for (let pack of game.packs) {
|
||||
const documents = await pack.getDocuments();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue