Skip to content

Commit

Permalink
fix: Defensive code
Browse files Browse the repository at this point in the history
  • Loading branch information
Crash-- committed Oct 31, 2023
1 parent 7da97a7 commit 67b65d8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/ducks/brandDictionary/brandsReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ const makeBrand = (
}
}
// !TODO remove when CozyClient getKonnector returns also worker === konnector & worker=== client
export const getKonnectorSlug = trigger => trigger.message.konnector
export const getKonnectorSlug = trigger => {
if (trigger.message && trigger.message.konnector) {
return trigger.message.konnector
}
return false
}

export const makeBrands = async (client, dispatch, inService) => {
const registry = new Registry({ client })
Expand Down

0 comments on commit 67b65d8

Please sign in to comment.