소스 검색

add window.location.pathname

zahmis 5 년 전
부모
커밋
4bfb74ac85
1개의 변경된 파일1개의 추가작업 그리고 5개의 파일을 삭제
  1. 1 5
      src/client/js/services/NavigationContainer.js

+ 1 - 5
src/client/js/services/NavigationContainer.js

@@ -91,11 +91,7 @@ export default class NavigationContainer extends Container {
       $('body').removeClass('on-edit');
       $('body').removeClass('builtin-editor');
       $('body').removeClass('hackmd');
-      if (window.location.hash === '') {
-        return;
-      }
-
-      window.history.replaceState('', '', window.location.href);
+      window.history.replaceState(null, '', window.location.pathname);
     }
 
     if (editorMode === 'edit') {