File tree Expand file tree Collapse file tree 6 files changed +13
-26
lines changed
dev/components/components Expand file tree Collapse file tree 6 files changed +13
-26
lines changed Original file line number Diff line number Diff line change @@ -146,9 +146,7 @@ export default {
146146 }
147147 },
148148 beforeDestroy () {
149- if (this .timeout ) {
150- clearTimeout (this .timeout )
151- }
149+ clearTimeout (this .timeout )
152150 },
153151 data () {
154152 return {
Original file line number Diff line number Diff line change @@ -111,11 +111,8 @@ export default {
111111 },
112112 dismiss (done ) {
113113 this .active = false
114-
115- if (this .timer ) {
116- clearTimeout (this .timer )
117- this .timer = null
118- }
114+ clearTimeout (this .timer )
115+ this .timer = null
119116
120117 setTimeout (() => {
121118 if (typeof this .stack [0 ].onDismiss === ' function' ) {
Original file line number Diff line number Diff line change @@ -152,9 +152,9 @@ export default {
152152 if (this .calls > 0 ) {
153153 return
154154 }
155- if ( this . timer ) {
156- clearTimeout (this .timer )
157- }
155+
156+ clearTimeout (this .timer )
157+
158158 if (! this .animate ) {
159159 this .active = false
160160 return
@@ -178,9 +178,7 @@ export default {
178178 highjackAjax (this .start , this .stop )
179179 },
180180 beforeDestroy () {
181- if (this .timer ) {
182- clearTimeout (this .timer )
183- }
181+ clearTimeout (this .timer )
184182 restoreAjax ()
185183 }
186184}
Original file line number Diff line number Diff line change @@ -49,10 +49,8 @@ export default {
4949 }
5050 this .cleanup = () => {
5151 this .target .classList .remove (' non-selectable' )
52- if (this .touchTimer ) {
53- clearTimeout (this .touchTimer )
54- this .touchTimer = null
55- }
52+ clearTimeout (this .touchTimer )
53+ this .touchTimer = null
5654 }
5755 this .target .addEventListener (' touchstart' , this .touchStartHandler )
5856 this .target .addEventListener (' touchcancel' , this .cleanup )
Original file line number Diff line number Diff line change @@ -443,10 +443,8 @@ export default {
443443 }
444444 },
445445 __dragCleanup () {
446- if (this .timeout ) {
447- clearTimeout (this .timeout )
448- this .timeout = null
449- }
446+ clearTimeout (this .timeout )
447+ this .timeout = null
450448 },
451449 __normalizeValue (value ) {
452450 if (this .pmin ) {
Original file line number Diff line number Diff line change @@ -25,10 +25,8 @@ export default {
2525 ctx . start ( evt )
2626 } ,
2727 abort ( evt ) {
28- if ( ctx . timer ) {
29- clearTimeout ( ctx . timer )
30- ctx . timer = null
31- }
28+ clearTimeout ( ctx . timer )
29+ ctx . timer = null
3230 } ,
3331 mouseAbort ( evt ) {
3432 document . removeEventListener ( 'mousemove' , ctx . mouseAbort )
You can’t perform that action at this time.
0 commit comments