@infrab4a/connect-angular 3.7.6-beta.0 → 3.7.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -978,23 +978,23 @@
|
|
|
978
978
|
return __generator(this, function (_h) {
|
|
979
979
|
switch (_h.label) {
|
|
980
980
|
case 0:
|
|
981
|
-
_h.trys.push([0, 2, ,
|
|
981
|
+
_h.trys.push([0, 2, , 5]);
|
|
982
982
|
return [4 /*yield*/, this.productRepository.get({ id: productId })];
|
|
983
983
|
case 1:
|
|
984
984
|
product = _h.sent();
|
|
985
|
-
return [3 /*break*/,
|
|
985
|
+
return [3 /*break*/, 5];
|
|
986
986
|
case 2:
|
|
987
987
|
error_1 = _h.sent();
|
|
988
|
-
if (!(error_1 instanceof i1$1.NotFoundError))
|
|
988
|
+
if (!(error_1 instanceof i1$1.NotFoundError))
|
|
989
|
+
throw error_1;
|
|
989
990
|
return [4 /*yield*/, this.variantRepository.get({ id: productId })];
|
|
990
991
|
case 3:
|
|
991
992
|
variant = _h.sent();
|
|
992
993
|
return [4 /*yield*/, this.productRepository.get({ id: variant.productId })];
|
|
993
994
|
case 4:
|
|
994
995
|
product = _h.sent();
|
|
995
|
-
|
|
996
|
-
case 5:
|
|
997
|
-
case 6: return [2 /*return*/, Object.assign(Object.assign({}, product.toPlain()), (variant && Object.assign({}, variant.toPlain())))];
|
|
996
|
+
return [3 /*break*/, 5];
|
|
997
|
+
case 5: return [2 /*return*/, Object.assign(Object.assign({}, product.toPlain()), (variant && Object.assign({}, variant.toPlain())))];
|
|
998
998
|
}
|
|
999
999
|
});
|
|
1000
1000
|
});
|