Skip to content

Commit

Permalink
fix(core): 🐛 fix wrong combo namespace / view hooks
Browse files Browse the repository at this point in the history
Closes #351
  • Loading branch information
thierrymichel committed Mar 17, 2019
1 parent 5bd085b commit 3c775a3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/core/src/modules/Views.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ export class Views {
*/
private _createHook(name: HooksView): Hook {
return data => {
const view = this.byNamespace.get(data.current.namespace);
const { namespace } = name.match(/enter/i) ? data.next : data.current;
const view = this.byNamespace.get(namespace);

if (view) {
view[name] && view[name](data);
Expand Down

0 comments on commit 3c775a3

Please sign in to comment.