Skip to content

Commit

Permalink
fix: history.pushState => history.replaceState #88
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Apr 2, 2020
1 parent 7b20f57 commit bb50413
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion css/index.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,9 +259,9 @@ sreach.prototype = {
:self.createSreachListHTML(val)
)
:self.creatListHTML();
if(window.history&&window.history.pushState)
val ? history.pushState({},"jsdig","?kw="+val):
history.pushState({},"jsdig","/");
if(window.history&&window.history.replaceState)
val ? history.replaceState({},"jsdig","?kw="+val):
history.replaceState({},"jsdig","/");

self.isErrorInfo(val);
},
Expand Down
Loading

0 comments on commit bb50413

Please sign in to comment.