This commit is contained in:
rahul shukla 2020-02-06 18:34:43 +05:30
parent 7f7a8bc1cd
commit 59ea3941ee
1 changed files with 4 additions and 2 deletions

View File

@ -73,10 +73,12 @@
var slugs = JSON.parse(storedRecentlyViewed);
var updatedSlugs = {};
if (this.quantity) {
slugs = slugs.slice(0, this.quantity);
if (slugs.length > 3) {
slugs = slugs.slice(Math.max(slugs.length - 3, 1));
}
slugs = slugs.reverse();
slugs.forEach(slug => {
updatedSlugs[slug] = {};
});