mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-11 19:25:21 +01:00
[Fix] ItemLink Fix (#1032)
* . * . * Removed outcommented code * Raised to minor version * Added confirmation on import of old character data
This commit is contained in:
parent
218f180fa0
commit
523ecb506b
14 changed files with 122 additions and 81 deletions
|
|
@ -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;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue