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

Added warning to avoid an issue with iff, else, iffElse hooks. #580

Merged
merged 1 commit into from
May 5, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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