Using foundry's isNewer function rather than custom one

This commit is contained in:
WBHarry 2025-08-23 15:48:31 +02:00
parent 482adabae4
commit 9b332c3681
3 changed files with 4 additions and 17 deletions

View file

@ -420,14 +420,3 @@ export async function createEmbeddedItemsWithEffects(actor, baseData) {
export const slugify = name => {
return name.toLowerCase().replaceAll(' ', '-').replaceAll('.', '');
};
export const versionCompare = (current, target) => {
const currentSplit = current.split('.').map(x => Number.parseInt(x));
const targetSplit = target.split('.').map(x => Number.parseInt(x));
for (var i = 0; i < currentSplit.length; i++) {
if (currentSplit[i] < targetSplit[i]) return true;
if (currentSplit[i] > targetSplit[i]) return false;
}
return false;
};