Skip to content

Commit

Permalink
fix step cache
Browse files Browse the repository at this point in the history
  • Loading branch information
zfben committed Aug 2, 2023
1 parent 43d7921 commit d6d7d53
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/step/src/hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,13 +187,12 @@ export function useStepRecordFunc<TName extends keyof Steps, TExtend extends Rec
})
const knex = useKnex()
const redis = useRedis()
let step: Step

if (options.afterMount)
options.afterMount()

return async function () {
if (!step) step = await query('steps').where('id', options.stepId).first()
const step = await query('steps').where('id', options.stepId).first()

const user = options.getUser ? await options.getUser({
http,
Expand Down

0 comments on commit d6d7d53

Please sign in to comment.