File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
vue-frontend/warehouse-frontend/src/views Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -121,9 +121,13 @@ export default {
121121 this .transactionsList .unshift (transaction);
122122 if (transaction .response_type === " OK" ) {
123123 playSuccessSound ();
124- const foundAsset = data .parent_data .child_assets .find (asset => asset .Name === transaction .assetId );
125- this .inventoryList .unshift (foundAsset);
126- localStorage .setItem (' inventoryList' , JSON .stringify (this .inventoryList ));
124+ const isAssetExist = this .inventoryList .find (asset => asset .Name === transaction .assetId );
125+ if (! isAssetExist) {
126+ const foundAsset = data .parent_data .child_assets .find (asset => asset .Name === transaction .assetId );
127+ this .inventoryList .unshift (foundAsset);
128+ localStorage .setItem (' inventoryList' , JSON .stringify (this .inventoryList ));
129+ }
130+
127131 } else if (transaction .response_type === " Problem" ) {
128132 playErrorSound ();
129133 } else if (transaction .response_type === " Verify" ) {
You can’t perform that action at this time.
0 commit comments