From f10383932f8548e0a44c42e43fd8654186c652da Mon Sep 17 00:00:00 2001 From: shadowusr Date: Thu, 30 Nov 2023 00:20:42 +0300 Subject: [PATCH 1/2] fix: handle edge case when error is null --- lib/static/components/state/state-error.jsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/static/components/state/state-error.jsx b/lib/static/components/state/state-error.jsx index 12ea61e19..3e0223749 100644 --- a/lib/static/components/state/state-error.jsx +++ b/lib/static/components/state/state-error.jsx @@ -43,7 +43,7 @@ class StateError extends Component { _getErrorPattern() { const {errorPatterns, error} = this.props; - return errorPatterns.find(({regexp}) => error.message?.match(regexp)); + return errorPatterns.find(({regexp}) => error?.message?.match(regexp)); } _drawImage() { @@ -61,6 +61,10 @@ class StateError extends Component { } _errorToElements(error) { + if (isEmpty(error)) { + return 'Unknown error'; + } + return map(error, (value, key) => { if (!value) { return null; @@ -113,7 +117,7 @@ class StateError extends Component { const extendedError = isEmpty(errorPattern) ? error - : {...error, message: `${errorPattern.name}\n${error.message}`, hint: () => parseHtmlString(errorPattern.hint)}; + : {...error, message: `${errorPattern.name}\n${error?.message}`, hint: () => parseHtmlString(errorPattern.hint)}; return (
From 4d01c9b1f076d51271fe6dfd3fe0df130c16f139 Mon Sep 17 00:00:00 2001 From: shadowusr Date: Tue, 21 May 2024 00:05:32 +0300 Subject: [PATCH 2/2] test: update header screenshots --- .../chrome/menu bar plugins clicked.png | Bin 2076 -> 2665 bytes .../972e9ff/chrome/menu bar plugins.png | Bin 176 -> 176 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/test/func/tests/screens/3144090/chrome/menu bar plugins clicked.png b/test/func/tests/screens/3144090/chrome/menu bar plugins clicked.png index a97118f0c8043ad30c6f699715dca88779c5fb02..c410bd41ae106aa855810aee1f8da3f4cbc66957 100644 GIT binary patch delta 2650 zcmV-g3Z?a&5a|?<7YaoP1^@s6#~MRUks%j<3L8m8K~#90?VVd}R7DuaYc$^Pml$6( z_5NbKy`b?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