mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-06 12:12:42 +00:00
Clear data from new key when appropriate
This commit is contained in:
@@ -158,6 +158,7 @@ const NewPage = createClass({
|
|||||||
|
|
||||||
const brew = res.body;
|
const brew = res.body;
|
||||||
localStorage.removeItem(BREWKEY);
|
localStorage.removeItem(BREWKEY);
|
||||||
|
localStorage.removeItem(STYLEKEY);
|
||||||
window.location = `/edit/${brew.googleId}${brew.editId}`;
|
window.location = `/edit/${brew.googleId}${brew.editId}`;
|
||||||
} else {
|
} else {
|
||||||
request.post('/api')
|
request.post('/api')
|
||||||
@@ -172,6 +173,7 @@ const NewPage = createClass({
|
|||||||
window.onbeforeunload = function(){};
|
window.onbeforeunload = function(){};
|
||||||
const brew = res.body;
|
const brew = res.body;
|
||||||
localStorage.removeItem(BREWKEY);
|
localStorage.removeItem(BREWKEY);
|
||||||
|
localStorage.removeItem(STYLEKEY);
|
||||||
window.location = `/edit/${brew.editId}`;
|
window.location = `/edit/${brew.editId}`;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user