mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-11-22 16:36:58 +00:00
Clear data from new key when appropriate
This commit is contained in:
1 parent
0eaeb748f4
commit
09c7f45c69
1 file changed
+2
@@ -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}`;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user