Explorar o código

add window.location.pathname

zahmis %!s(int64=5) %!d(string=hai) anos
pai
achega
4bfb74ac85
Modificáronse 1 ficheiros con 1 adicións e 5 borrados
  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') {