Skip to content
This repository has been archived by the owner on Apr 20, 2018. It is now read-only.

remove hook should check if hook.result is not null #99

Closed
whollacsek opened this issue Sep 20, 2016 · 5 comments
Closed

remove hook should check if hook.result is not null #99

whollacsek opened this issue Sep 20, 2016 · 5 comments

Comments

@whollacsek
Copy link

Got error: TypeError: Cannot read property 'toObject' of null at https://github.com/feathersjs/feathers-hooks/blob/master/src/bundled.js#L138

@ryuken
Copy link
Contributor

ryuken commented Sep 20, 2016

Did you get that because you use the hook both in before & after?

@whollacsek
Copy link
Author

I only used it as after hook.

Le mar. 20 sept. 2016 à 22:54, Taushif Habiboellah [email protected]
a écrit :

Did you get that because you use the hook both in before & after?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#99 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAyYUFqHiAOQ4YflPlBNCgGFqFTR-oYGks5qsEfpgaJpZM4KBk6j
.

@daffl
Copy link
Member

daffl commented Sep 22, 2016

Sounds like a good change. Can probably be done by changing https://github.com/feathersjs/feathers-hooks/blob/master/src/bundled.js#L137 to } else if(result) {.

@kaiquewdev
Copy link
Contributor

#101

@daffl
Copy link
Member

daffl commented Sep 27, 2016

v1.5.8

@daffl daffl closed this as completed Sep 27, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants