File tree Expand file tree Collapse file tree 1 file changed +19
-12
lines changed
Expand file tree Collapse file tree 1 file changed +19
-12
lines changed Original file line number Diff line number Diff line change 2929 var width = ( 101 / 100 ) * progress ;
3030 width = Math . round ( width * 100 ) / 100 ;
3131
32+ // TODO: Is this a jquery.transit bug? Research error cause further and fill out proper bug report.
33+ var doubleCompletePrevention = false ;
34+
3235 $progressBar . transit ( {
3336 width : width + '%' ,
3437 duration : duration ,
3538 complete : function ( ) {
36- if ( width > 99 ) {
37- $progressBar . delay ( settings . fadeDelay ) ;
38- $progressBar . fadeOut ( {
39- duration : settings . fadeDuration ,
40- complete : function ( ) {
41- $progressBar . remove ( ) ;
42- }
43- } ) ;
44- settings . onComplete ( ) ;
45- }
46- if ( finished ) {
47- finished ( ) ;
39+ if ( doubleCompletePrevention ) {
40+ if ( width > 99 ) {
41+ $progressBar . delay ( settings . fadeDelay ) ;
42+ $progressBar . fadeOut ( {
43+ duration : settings . fadeDuration ,
44+ complete : function ( ) {
45+ $progressBar . remove ( ) ;
46+ }
47+ } ) ;
48+ settings . onComplete ( ) ;
49+ }
50+ if ( finished ) {
51+ finished ( ) ;
52+ }
53+ } else {
54+ doubleCompletePrevention = true ;
4855 }
4956 }
5057 } ) ;
You can’t perform that action at this time.
0 commit comments