File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -253,6 +253,11 @@ function pjax(options) {
253
253
return
254
254
}
255
255
256
+ if ( options . push && ! options . replace ) {
257
+ // Cache current container element before replacing it
258
+ cachePush ( pjax . state . id , context . clone ( ) . contents ( ) )
259
+ }
260
+
256
261
// Update browser location and history
257
262
pjax . state = {
258
263
id : options . id || uniqueId ( ) ,
@@ -344,11 +349,6 @@ function pjax(options) {
344
349
var xhr = pjax . xhr = $ . ajax ( options )
345
350
346
351
if ( xhr . readyState > 0 ) {
347
- if ( options . push && ! options . replace ) {
348
- // Cache current container element before replacing it
349
- cachePush ( pjax . state . id , context . clone ( ) . contents ( ) )
350
- }
351
-
352
352
fire ( 'pjax:start' , [ xhr , options ] )
353
353
fire ( 'pjax:send' , [ xhr , options ] )
354
354
}
You can’t perform that action at this time.
0 commit comments