File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
packages/@glimmer/runtime/lib/modifiers Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -58,19 +58,18 @@ export class OnModifierState {
5858 let { element, args, listener } = this ;
5959
6060 let arg0 = args . positional [ 0 ] ;
61-
62- if ( DEBUG && ! arg0 ) {
63- throw new Error (
64- 'You must pass a valid DOM event name as the first argument to the `on` modifier'
65- ) ;
66- }
67-
6861 let eventName = check (
6962 arg0 ? valueForRef ( arg0 ) : undefined ,
7063 CheckString ,
7164 ( ) => 'You must pass a valid DOM event name as the first argument to the `on` modifier'
7265 ) ;
7366
67+ if ( DEBUG && ! eventName ) {
68+ throw new Error (
69+ 'You must pass a valid DOM event name as the first argument to the `on` modifier'
70+ ) ;
71+ }
72+
7473 let arg1 = args . positional [ 1 ] ;
7574 let userProvidedCallback = check (
7675 arg1 ? valueForRef ( arg1 ) : undefined ,
You can’t perform that action at this time.
0 commit comments