[Fix] ItemLink Fix (#1032)

* .

* .

* Removed outcommented code

* Raised to minor version

* Added confirmation on import of old character data
This commit is contained in:
WBHarry 2025-08-22 01:38:07 +02:00 committed by GitHub
parent 218f180fa0
commit 523ecb506b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 122 additions and 81 deletions

View file

@ -420,3 +420,14 @@ 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;
};