Skip to content

Commit

Permalink
remove regex in error interceptor
Browse files Browse the repository at this point in the history
  • Loading branch information
Miguel7373 committed Jan 23, 2025
1 parent 56d0bae commit 6b56eaf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/app/interceptors/error.interceptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Router } from '@angular/router';
import {
DRAWER_ROUTES,
ERROR_MESSAGE_KEY_PREFIX,
GJ_REGEX_PATTERN, MessageEntry, MessageStatusCode,
MessageEntry, MessageStatusCode,
SUCCESS_MESSAGE_KEY_PREFIX,
SUCCESS_MESSAGE_MAP
} from '../shared/constant-library';
Expand Down Expand Up @@ -56,7 +56,7 @@ export class ErrorInterceptor implements HttpInterceptor {
}

let messageKey = successMessageObj.key;
const isBacklogQuarter = !GJ_REGEX_PATTERN.test(response.body?.quarterLabel);
const isBacklogQuarter = !response.body?.isBacklogQuarter;
if (messageKey == 'OBJECTIVE.POST' && isBacklogQuarter) {
messageKey += '_BACKLOG';
}
Expand Down

0 comments on commit 6b56eaf

Please sign in to comment.