We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a2fdf41 commit 3a1acc5Copy full SHA for 3a1acc5
1 file changed
src/bind.ts
@@ -73,7 +73,8 @@ function handleEvent(event: Event) {
73
74
type Binding = {type: string; tag: string; method: string}
75
function* bindings(el: Element): Iterable<Binding> {
76
- for (const action of (el.getAttribute('data-action') || '').split(' ')) {
+ for (const action of (el.getAttribute('data-action') || '').split(/\s+/)) {
77
+ if (!action) continue
78
const eventSep = action.lastIndexOf(':')
79
const methodSep = action.lastIndexOf('#')
80
const type = action.slice(0, eventSep)
0 commit comments