You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How does it come, that you use context.params.provider as 'external'? I don't know any feathers library, that does this. isProvider expects your input as: 'socketio' | 'rest' | 'primus' | undefined. That are the common values for context.params.provider. If you set it yourself, please set it to socketio or rest to be consistent with other libraries.
Thx for the quick reply and the good work - I was missing the valid values for context.params.provider that isProvider extends-)
For complete reference: https://docs.feathersjs.com/api/services.html#params context.params.provider can be 'socketio' | 'rest' | 'primus' | undefined
Consider a provider check in a hook:
iff(isProvider('external'), doSomethingForExternal())
Expected behavior
doSomethingForExternal() is executed only if context.params.provider === 'external'
Actual behavior
doSomethingForExternal() is executed if context.params.provider === 'rest'
Replacing isProvider() works as expected:
iff(context => context.params.provider === 'external', doSomethingForExternal())
Module versions v6.1.0
Possibly an issue with the comparison in index.js - line 784:
providers.some((provider) => provider === hookProvider || provider === "server" && !hookProvider || provider === "external" && !!hookProvider)
The text was updated successfully, but these errors were encountered: