Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Commit

Permalink
Merge pull request #580 from feathersjs/iff-this
Browse files Browse the repository at this point in the history
Added warning to avoid an issue with iff, else, iffElse hooks.
  • Loading branch information
eddyystop authored May 5, 2017
2 parents 6b0a4e7 + 2463bfa commit 09161d6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions api/hooks-common.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,10 @@ They may include other conditional hooks.

See also iff, iffElse, when, unless, isNot, isProvider.

> **This** The predicate and hook functions in the if, else and iffElse hooks
will not be called with `this` set to the service.
Use `hook.service` instead.


## every

Expand Down Expand Up @@ -299,6 +303,9 @@ They may include other conditional hooks.

See also iffElse, else, when, unless, isNot, isProvider.

> **This** The predicate and hook functions in the if, else and iffElse hooks
will not be called with `this` set to the service.
Use `hook.service` instead.

## iffElse

Expand Down Expand Up @@ -333,6 +340,9 @@ It returns either a boolean or a Promise that evaluates to a boolean

See also iff, else, when, unless, isNot, isProvider.

> **This** The predicate and hook functions in the if, else and iffElse hooks
will not be called with `this` set to the service.
Use `hook.service` instead.

## isNot

Expand Down

0 comments on commit 09161d6

Please sign in to comment.