Merge pull request #8520 from colinux/fix-stimulus-on-handler
fix(stimulus): "on" handler having target
This commit is contained in:
commit
17141a26d5
1 changed files with 4 additions and 1 deletions
|
@ -65,7 +65,10 @@ export class ApplicationController extends Controller {
|
|||
FOCUS_EVENTS.includes(targetOrEventName)
|
||||
);
|
||||
} else {
|
||||
invariant(eventNameOrHandler == 'string', 'event name is required');
|
||||
invariant(
|
||||
typeof eventNameOrHandler == 'string',
|
||||
'event name is required'
|
||||
);
|
||||
invariant(handler, 'handler is required');
|
||||
this.onTarget(targetOrEventName, eventNameOrHandler, handler);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue