Skip to content

Commit 56442de

Browse files
committed
🐞 do not do append history if no items. #779
1 parent bb33d11 commit 56442de

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

js/history.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ proto.destroyHistory = function() {
103103
// ----- append history ----- //
104104

105105
proto.onAppendHistory = function( response, path, items ) {
106+
// do not proceed if no items. #779
107+
if ( !items || !items.length ) {
108+
return;
109+
}
106110
var firstItem = items[0];
107111
var elemScrollY = this.getElementScrollY( firstItem );
108112
// resolve path

0 commit comments

Comments
 (0)