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

Clear data from new key when appropriate

This commit is contained in:
Sean Robertson
2021-06-21 16:27:18 +12:00
parent 0eaeb748f4
commit 09c7f45c69

View File

@@ -158,6 +158,7 @@ const NewPage = createClass({
const brew = res.body;
localStorage.removeItem(BREWKEY);
localStorage.removeItem(STYLEKEY);
window.location = `/edit/${brew.googleId}${brew.editId}`;
} else {
request.post('/api')
@@ -172,6 +173,7 @@ const NewPage = createClass({
window.onbeforeunload = function(){};
const brew = res.body;
localStorage.removeItem(BREWKEY);
localStorage.removeItem(STYLEKEY);
window.location = `/edit/${brew.editId}`;
});
}