File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1890,7 +1890,7 @@ var htmx = (function() {
18901890 let settleResolve = null
18911891 let settleReject = null
18921892
1893- const normalSwap = ! oobSettleInfo // is this a normal swap or from an oobSwap
1893+ const isOOBSwap = ! ! oobSettleInfo // calls passing oobSettleInfo are from oobSwap function and can skip some logic
18941894
18951895 let doSwap = function ( ) {
18961896 maybeCall ( swapOptions . beforeSwapCallback )
@@ -1927,7 +1927,7 @@ var htmx = (function() {
19271927 fragment = fragment . querySelector ( '[hx-history-elt],[data-hx-history-elt]' ) || fragment
19281928 }
19291929
1930- if ( normalSwap ) {
1930+ if ( ! isOOBSwap ) {
19311931 // select-oob swaps
19321932 if ( swapOptions . selectOOB ) {
19331933 const oobSelectValues = swapOptions . selectOOB . split ( ',' )
@@ -1998,7 +1998,7 @@ var htmx = (function() {
19981998 if ( elt . classList ) {
19991999 elt . classList . add ( htmx . config . settlingClass )
20002000 }
2001- if ( normalSwap ) {
2001+ if ( ! isOOBSwap ) {
20022002 triggerEvent ( elt , 'htmx:afterSwap' , swapOptions . eventInfo )
20032003 }
20042004 } )
@@ -2043,7 +2043,7 @@ var htmx = (function() {
20432043 }
20442044 }
20452045 }
2046- let shouldTransition = normalSwap && htmx . config . globalViewTransitions
2046+ let shouldTransition = ! isOOBSwap && htmx . config . globalViewTransitions
20472047 if ( swapSpec . hasOwnProperty ( 'transition' ) ) {
20482048 shouldTransition = swapSpec . transition
20492049 }
You can’t perform that action at this time.
0 commit comments