Skip to content

Commit

Permalink
refactor: remove magic number in getNotificationsOverheadDrivers getter
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Dej <[email protected]>
  • Loading branch information
meteyou committed Nov 5, 2024
1 parent a351441 commit 54d1de3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/store/gui/notifications/getters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -439,13 +439,13 @@ export const getters: GetterTree<GuiNotificationState, any> = {
// get all dismissed tmcwarnings and convert it to a string[]
const tmcwarningsDismisses = getters['getDismissByCategory']('tmcwarning').map(
(dismiss: GuiNotificationStateDismissEntry) => {
return dismiss.id
return `tmcwarning/${dismiss.id}`
}
)

// return filtered tmcwarnings
return notifications.filter((entry) => {
return !tmcwarningsDismisses.includes(entry.id.substring(11))
return !tmcwarningsDismisses.includes(entry.id)
})
},

Expand Down

0 comments on commit 54d1de3

Please sign in to comment.