@@ -86,13 +86,13 @@ export class PostedItemMessageModel extends WarhammerMessageModel {
86
86
const hasItem = actor . itemTypes [ this . itemData . type ] . find ( i => i . name === this . itemData . name
87
87
&& i . _stats . compendiumSource === this . itemData . _stats . compendiumSource
88
88
&& i . system . encumbrance . value === this . itemData . system . encumbrance . value
89
- && JSON . stringify ( i . system . price ) === JSON . stringify ( this . itemData . system . price )
90
- && JSON . stringify ( i . system . description ) === JSON . stringify ( this . itemData . system . description )
91
- && JSON . stringify ( i . system . availability ) === JSON . stringify ( this . itemData . system . availability )
92
- && JSON . stringify ( i . system . flaws ) === JSON . stringify ( this . itemData . system . flaws )
93
- && JSON . stringify ( i . system . qualities ) === JSON . stringify ( this . itemData . system . qualities )
94
- && JSON . stringify ( i . system . trappingType ) === JSON . stringify ( this . itemData . system . trappingType )
95
- && JSON . stringify ( i . system . damageToItem ) === JSON . stringify ( this . itemData . system . damageToItem ) ) ;
89
+ && foundry . utils . objectsEqual ( i . system . price , this . itemData . system . price )
90
+ && foundry . utils . objectsEqual ( i . system . description , this . itemData . system . description )
91
+ && foundry . utils . objectsEqual ( i . system . availability , this . itemData . system . availability )
92
+ && foundry . utils . objectsEqual ( i . system . flaws , this . itemData . system . flaws )
93
+ && foundry . utils . objectsEqual ( i . system . qualities , this . itemData . system . qualities )
94
+ && foundry . utils . objectsEqual ( i . system . trappingType , this . itemData . system . trappingType )
95
+ && foundry . utils . objectsEqual ( i . system . damageToItem , this . itemData . system . damageToItem ) ) ;
96
96
if ( hasItem ) {
97
97
await actor . updateEmbeddedDocuments ( "Item" , [ {
98
98
_id : hasItem . id ,
0 commit comments