Procházet zdrojové kódy

add window.location.pathname

zahmis před 5 roky
rodič
revize
4bfb74ac85
1 změnil soubory, kde provedl 1 přidání a 5 odebrání
  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') {