Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
calebporzio committed Dec 20, 2022
1 parent 5ede250 commit 1bcc91c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/alpinejs/src/directives/x-model.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ function getInputValue(el, modifiers, event, currentValue) {
// Safari autofill triggers event as CustomEvent and assigns value to target
// so we return event.target.value instead of event.detail
if (event instanceof CustomEvent && event.detail !== undefined) {
return event.detail || event.target.value
return typeof event.detail != 'undefined' ? event.detail : event.target.value
} else if (el.type === 'checkbox') {
// If the data we are binding to is an array, toggle its value inside the array.
if (Array.isArray(currentValue)) {
Expand Down

0 comments on commit 1bcc91c

Please sign in to comment.