@dotdev/next-components
Advanced tools
Comparing version 1.2.4 to 1.2.5
@@ -80,4 +80,4 @@ "use strict"; | ||
"Cache-Control": "no-cache", | ||
"cache": "no-cache", | ||
}, | ||
cache: "no-cache" | ||
} | ||
})]; | ||
@@ -203,17 +203,21 @@ case 1: | ||
this.updateProperties = function (key, properties) { return __awaiter(_this, void 0, void 0, function () { | ||
var response, err_5; | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
var response, _a, _b, _c, _d, err_5; | ||
return __generator(this, function (_e) { | ||
switch (_e.label) { | ||
case 0: | ||
_a.trys.push([0, 2, , 3]); | ||
return [4 /*yield*/, this.cart.updateItem(key, { | ||
properties: properties | ||
})]; | ||
case 1: | ||
response = _a.sent(); | ||
_e.trys.push([0, 3, , 4]); | ||
_b = (_a = this.cart).updateItem; | ||
_c = [key]; | ||
_d = {}; | ||
return [4 /*yield*/, this.cart.getItem(key)]; | ||
case 1: return [4 /*yield*/, _b.apply(_a, _c.concat([(_d.quantity = (_e.sent()).quantity, | ||
_d.properties = properties, | ||
_d)]))]; | ||
case 2: | ||
response = _e.sent(); | ||
this.context.update({ message: "CART_PROPERTIES_UPDATE_SUCCESS" }); | ||
this.getCartJSON(); | ||
return [3 /*break*/, 3]; | ||
case 2: | ||
err_5 = _a.sent(); | ||
return [3 /*break*/, 4]; | ||
case 3: | ||
err_5 = _e.sent(); | ||
this.context.update({ | ||
@@ -223,4 +227,4 @@ message: "CART_PROPERTIES_UPDATE_FAILED", | ||
}); | ||
return [3 /*break*/, 3]; | ||
case 3: return [2 /*return*/]; | ||
return [3 /*break*/, 4]; | ||
case 4: return [2 /*return*/]; | ||
} | ||
@@ -227,0 +231,0 @@ }); |
{ | ||
"name": "@dotdev/next-components", | ||
"version": "1.2.4", | ||
"version": "1.2.5", | ||
"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
141046
2063