@dotdev/next-components
Advanced tools
Comparing version 1.0.12 to 1.0.13
@@ -41,2 +41,3 @@ "use strict"; | ||
var universal_cookie_1 = require("universal-cookie"); | ||
var Utils = require("../utils"); | ||
var Wishlist = /** @class */ (function () { | ||
@@ -80,3 +81,3 @@ function Wishlist() { | ||
this.getWishlist = function () { | ||
if (!localStorage.getItem(_this.wishlistKey)) { | ||
if (!Utils.getLocalStorage(_this.wishlistKey)) { | ||
_this.getWishlistJSON(); | ||
@@ -86,3 +87,3 @@ } | ||
_this.context.update({ | ||
wishlist: JSON.parse(localStorage.getItem(_this.wishlistKey)), | ||
wishlist: JSON.parse(Utils.getLocalStorage(_this.wishlistKey)), | ||
message: "WISHLIST_REQUEST_SUCCESS" | ||
@@ -105,3 +106,3 @@ }); | ||
.then(function (data) { | ||
localStorage.setItem(_this.wishlistKey, JSON.stringify(data)); | ||
Utils.setLocalStorage(_this.wishlistKey, JSON.stringify(data)); | ||
_this.context.update({ | ||
@@ -126,3 +127,3 @@ wishlist: data, | ||
this.checkItem = function (productId, variantId) { | ||
var local = localStorage.getItem(_this.wishlistKey); | ||
var local = Utils.getLocalStorage(_this.wishlistKey); | ||
var items = JSON.parse(local) ? JSON.parse(local).items : []; | ||
@@ -129,0 +130,0 @@ return items.length |
{ | ||
"name": "@dotdev/next-components", | ||
"version": "1.0.12", | ||
"version": "1.0.13", | ||
"license": "SEE LICENSE IN LICENCE.md", | ||
@@ -5,0 +5,0 @@ "description": "Common components for Next projects", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
128400
1857
13