@vtex/order-manager
Advanced tools
Comparing version 0.5.2 to 0.5.4-beta.0
@@ -10,2 +10,8 @@ # Changelog | ||
## [0.5.4-beta.0] - 2021-07-15 | ||
## [0.5.4-beta] - 2021-07-15 | ||
## [0.5.3-beta] - 2021-07-15 | ||
## [0.5.2] - 2021-05-05 | ||
@@ -12,0 +18,0 @@ ### Fixed |
/*! | ||
* @vtex/order-manager v0.5.2 | ||
* @vtex/order-manager v0.5.4-beta.0 | ||
* (c) VTEX | ||
@@ -526,3 +526,5 @@ * Released under the MIT License. | ||
try { | ||
localStorage.setItem('orderform', JSON.stringify(orderForm)); | ||
if (navigator.cookieEnabled) { | ||
localStorage.setItem('orderform', JSON.stringify(orderForm)); | ||
} | ||
} | ||
@@ -543,5 +545,6 @@ catch (error) { | ||
var _a; | ||
return typeof document === 'undefined' | ||
? null | ||
: JSON.parse((_a = localStorage.getItem('orderform')) !== null && _a !== void 0 ? _a : 'null'); | ||
if (typeof document === 'undefined' || !navigator.cookieEnabled) { | ||
return null; | ||
} | ||
return JSON.parse((_a = localStorage.getItem('orderform')) !== null && _a !== void 0 ? _a : 'null'); | ||
} | ||
@@ -548,0 +551,0 @@ function reducer(prevOrderForm, updateOrderForm) { |
/*! | ||
* @vtex/order-manager v0.5.2 | ||
* @vtex/order-manager v0.5.4-beta.0 | ||
* (c) VTEX | ||
@@ -534,3 +534,5 @@ * Released under the MIT License. | ||
try { | ||
localStorage.setItem('orderform', JSON.stringify(orderForm)); | ||
if (navigator.cookieEnabled) { | ||
localStorage.setItem('orderform', JSON.stringify(orderForm)); | ||
} | ||
} | ||
@@ -551,5 +553,6 @@ catch (error) { | ||
var _a; | ||
return typeof document === 'undefined' | ||
? null | ||
: JSON.parse((_a = localStorage.getItem('orderform')) !== null && _a !== void 0 ? _a : 'null'); | ||
if (typeof document === 'undefined' || !navigator.cookieEnabled) { | ||
return null; | ||
} | ||
return JSON.parse((_a = localStorage.getItem('orderform')) !== null && _a !== void 0 ? _a : 'null'); | ||
} | ||
@@ -556,0 +559,0 @@ function reducer(prevOrderForm, updateOrderForm) { |
{ | ||
"name": "@vtex/order-manager", | ||
"version": "0.5.2", | ||
"version": "0.5.4-beta.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "cdn": "dist/index.umd.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
204048
2649
1