Skip to content

Commit

Permalink
fix(HarvestBanner): Problem with queries
Browse files Browse the repository at this point in the history
  • Loading branch information
cballevre committed Feb 27, 2024
1 parent 8ea810e commit fcacc43
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ const HarvestRoutes = () => {
queryKonnector.options
)

const konnectorWithTriggers = konnector
? { ...konnector, triggers: { data: triggers } }
: undefined
const konnectorWithTriggers =
konnector && trigger
? { ...konnector, triggers: { data: triggers } }
: undefined

const onDismiss = useCallback(() => {
navigate('..')
Expand Down
2 changes: 1 addition & 1 deletion src/lib/queries.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const buildTriggersQueryByKonnectorSlug = (slug, enabled) => ({
export const buildKonnectorBySlug = (slug, enabled = Boolean(slug)) => ({
definition: () => Q('io.cozy.konnectors').getById(`io.cozy.konnectors/${slug}`),
options: {
as: 'konnector',
as: `io.cozy.konnectors/${slug}`,
singleDocData: true,
enabled
}
Expand Down

0 comments on commit fcacc43

Please sign in to comment.