@akinon/next 1.89.0-rc.17 → 1.89.0-rc.19

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @akinon/next
2
2
 
3
+ ## 1.89.0-rc.19
4
+
5
+ ### Minor Changes
6
+
7
+ - 823d82f: ZERO-3393: Enhance error handling in checkout middleware to ensure errors are checked for existence before processing
8
+
9
+ ## 1.89.0-rc.18
10
+
3
11
  ## 1.89.0-rc.17
4
12
 
5
13
  ### Minor Changes
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@akinon/next",
3
3
  "description": "Core package for Project Zero Next",
4
- "version": "1.89.0-rc.17",
4
+ "version": "1.89.0-rc.19",
5
5
  "private": false,
6
6
  "license": "MIT",
7
7
  "bin": {
@@ -34,7 +34,7 @@
34
34
  "set-cookie-parser": "2.6.0"
35
35
  },
36
36
  "devDependencies": {
37
- "@akinon/eslint-plugin-projectzero": "1.89.0-rc.17",
37
+ "@akinon/eslint-plugin-projectzero": "1.89.0-rc.19",
38
38
  "@babel/core": "7.26.10",
39
39
  "@babel/preset-env": "7.26.9",
40
40
  "@babel/preset-typescript": "7.27.0",
@@ -51,8 +51,9 @@ export const errorMiddleware: Middleware = ({ dispatch }: MiddlewareParams) => {
51
51
  const errors = result?.payload?.errors;
52
52
 
53
53
  if (
54
- (typeof errors === 'object' && Object.keys(errors).length > 0) ||
55
- (Array.isArray(errors) && errors.length > 0)
54
+ !!errors &&
55
+ ((typeof errors === 'object' && Object.keys(errors).length > 0) ||
56
+ (Array.isArray(errors) && errors.length > 0))
56
57
  ) {
57
58
  dispatch(setErrors(errors));
58
59
  }