This commit is contained in:
Shubham Mehrotra 2020-08-10 21:43:31 +05:30
parent f81ea44869
commit e40afeaf90
2 changed files with 4 additions and 1 deletions

View File

@ -337,7 +337,7 @@
});
let comparedItems = JSON.parse(localStorage.getItem('compared_product'));
$('#compare-items-count').append(comparedItems.length);
$('#compare-items-count').html(comparedItems ? comparedItems.length : 0);
function toggleDropdown(e) {
var currentElement = $(e.currentTarget);

View File

@ -82,6 +82,9 @@
this.$root.addFlashMessages()
}
}
let comparedItems = JSON.parse(localStorage.getItem('compared_product'));
$('#compare-items-count').html(comparedItems ? comparedItems.length : 0);
},
'getStorageValue': function (key) {