Surf commited on
Commit
9eab607
·
1 Parent(s): 32a7b67

让开始创作与旧平台 hash 导航保持同步

Browse files
Files changed (1) hide show
  1. fanqie/dist/project-integration.js +2 -2
fanqie/dist/project-integration.js CHANGED
@@ -45,8 +45,8 @@
45
  return aside.querySelector('nav')
46
  }
47
  function setHash(value) {
48
- if (location.hash !== '#' + value) history.pushState({}, '', '#' + value)
49
- renderForHash()
50
  }
51
  function ensureSidebar() {
52
  var aside = findSidebar()
 
45
  return aside.querySelector('nav')
46
  }
47
  function setHash(value) {
48
+ if (location.hash !== '#' + value) location.hash = '#' + value
49
+ else renderForHash()
50
  }
51
  function ensureSidebar() {
52
  var aside = findSidebar()