Skip to content

Commit feec508

Browse files
core: frontend: libs: Use new isBackendOffline
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
1 parent f098bcb commit feec508

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/frontend/src/libs/notifier.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import message_manager, { MessageLevel } from '@/libs/message-manager'
22
import notifications from '@/store/notifications'
33
import { GenericError, getErrorMessage, Service } from '@/types/common'
44
import { LiveNotification, NotificationLevel } from '@/types/notifications'
5-
import { backend_offline_error } from '@/utils/api'
5+
import { isBackendOffline } from '@/utils/api'
66

77
class Notifier {
88
constructor(
@@ -39,7 +39,7 @@ class Notifier {
3939
}
4040

4141
pushBackError(type: string, error: GenericError, alert = false): void {
42-
if (error === backend_offline_error) { return }
42+
if (isBackendOffline(error)) { return }
4343
const message = getErrorMessage(error)
4444
this.pushError(type, message, alert)
4545
}

0 commit comments

Comments
 (0)