mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-13 20:21:06 +01:00
Improved item-identicial check
This commit is contained in:
parent
5d0a59bd12
commit
3c9bbf770c
2 changed files with 10 additions and 3 deletions
|
|
@ -437,3 +437,11 @@ export function shuffleArray(array) {
|
|||
|
||||
return array;
|
||||
}
|
||||
|
||||
export function itemIsIdentical(a, b) {
|
||||
const compendiumSource = a._stats.compendiumSource === b._stats.compendiumSource;
|
||||
const name = a.name === b.name;
|
||||
const description = a.system.description === b.system.description;
|
||||
|
||||
return compendiumSource && name & description;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue