Skip to content

Commit 2ab7c27

Browse files
committed
Only ignore input change event if the id is present
1 parent 3aa849f commit 2ab7c27

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/file-attachment-element.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,9 @@ function onChange(event: Event) {
140140
if (!(container instanceof FileAttachmentElement)) return
141141
const input = event.target
142142
if (!(input instanceof HTMLInputElement)) return
143+
143144
const id = container.getAttribute('input')
144-
if (!id || input.id !== id) return
145+
if (id && input.id !== id) return
145146

146147
const files = input.files
147148
if (!files || files.length === 0) return

0 commit comments

Comments
 (0)