Explorar el Código

add window.location.pathname

zahmis hace 5 años
padre
commit
4bfb74ac85
Se han modificado 1 ficheros con 1 adiciones y 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') {