Browse Source

revert how CustomEvent is checked

Keyur Shah 5 năm trước cách đây
mục cha
commit
7cf0fc366d
5 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 0 0
      dist/alpine-ie11.js
  2. 0 0
      dist/alpine-ie11.js.map
  3. 0 0
      dist/alpine.js
  4. 0 0
      dist/alpine.js.map
  5. 2 2
      src/directives/model.js

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/alpine-ie11.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/alpine-ie11.js.map


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/alpine.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/alpine.js.map


+ 2 - 2
src/directives/model.js

@@ -27,8 +27,8 @@ function generateModelAssignmentFunction(el, modifiers, expression) {
     }
 
     return (event, currentValue) => {
-        //check for non IE11. due to an issue where IE11 handles the event as a CustomEvent. The event should be undefined
-        if (event instanceof CustomEvent && !window.document.documentMode) {
+        //check for event.detail. due to an issue where IE11 handles the event as a CustomEvent. The event should be undefined
+        if (event instanceof CustomEvent && event.detail) {
             return event.detail
         } else if (el.type === 'checkbox') {
             // If the data we are binding to is an array, toggle it's value inside the array.

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác