Browse Source

fix: always trigger the switchChange event after a change event

Francesco Pontillo 10 năm trước cách đây
mục cha
commit
b18a65ba9b
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      src/coffee/bootstrap-switch.coffee

+ 2 - 1
src/coffee/bootstrap-switch.coffee

@@ -376,7 +376,8 @@ do ($ = window.jQuery, window) ->
               .not(@$element)
               .prop("checked", false)
               .trigger "change.bootstrapSwitch", true
-            @$element.trigger "switchChange.bootstrapSwitch", [state]
+          
+          @$element.trigger "switchChange.bootstrapSwitch", [state]
 
         "focus.bootstrapSwitch": (e) =>
           e.preventDefault()