Skip to content

Commit

Permalink
Remove unnecessary if case
Browse files Browse the repository at this point in the history
- It's already captured by the next if case
  • Loading branch information
mofojed committed Jul 29, 2024
1 parent b896270 commit 578a74f
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions plugins/ui/src/js/src/widget/WidgetErrorUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ export function getErrorName(error: NonNullable<unknown>): string {
* @returns The error message
*/
export function getErrorMessage(error: NonNullable<unknown>): string {
if (isWidgetError(error)) {
return error.message.trim();
}
if (
typeof error === 'object' &&
'message' in error &&
Expand Down

0 comments on commit 578a74f

Please sign in to comment.