0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 20:42:43 +00:00

use replaceState instead

This commit is contained in:
David Bolack
2024-08-20 13:15:32 -05:00
parent 67e868b5ee
commit 727f2bd80e

View File

@@ -85,7 +85,7 @@ const NewPage = createClass({
localStorage.setItem(STYLEKEY, brew.style);
localStorage.setItem(METAKEY, JSON.stringify({ 'renderer': brew.renderer, 'theme': brew.theme, 'lang': brew.lang }));
if(window.location.pathname != '/new') {
window.location.pathname = '/new';
window.history.replaceState({}, window.location.title, '/new/');
}
},
componentWillUnmount : function() {