mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-31 06:32:37 +00:00
Merge pull request #1416 from G-Ambatte/fixGoogleBrews_v2_13
Attempt to fix issue with saving Google brews.
This commit is contained in:
@@ -135,7 +135,7 @@ const NewPage = createClass({
|
||||
|
||||
console.log('saving new brew');
|
||||
|
||||
const brew = this.state.brew;
|
||||
let brew = this.state.brew;
|
||||
// Split out CSS to Style if CSS codefence exists
|
||||
if(brew.text.startsWith('```css') && brew.text.indexOf('```\n\n') > 0) {
|
||||
const index = brew.text.indexOf('```\n\n');
|
||||
@@ -155,7 +155,7 @@ const NewPage = createClass({
|
||||
return;
|
||||
});
|
||||
|
||||
const brew = res.body;
|
||||
brew = res.body;
|
||||
localStorage.removeItem(BREWKEY);
|
||||
localStorage.removeItem(STYLEKEY);
|
||||
window.location = `/edit/${brew.googleId}${brew.editId}`;
|
||||
@@ -170,7 +170,7 @@ const NewPage = createClass({
|
||||
return;
|
||||
}
|
||||
window.onbeforeunload = function(){};
|
||||
const brew = res.body;
|
||||
brew = res.body;
|
||||
localStorage.removeItem(BREWKEY);
|
||||
localStorage.removeItem(STYLEKEY);
|
||||
window.location = `/edit/${brew.editId}`;
|
||||
|
||||
Reference in New Issue
Block a user