mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-11 04:42:42 +00:00
Fix /new storing string "undefined" in Style tab
This commit is contained in:
@@ -67,7 +67,8 @@ const NewPage = createClass({
|
|||||||
}
|
}
|
||||||
|
|
||||||
localStorage.setItem(BREWKEY, brew.text);
|
localStorage.setItem(BREWKEY, brew.text);
|
||||||
localStorage.setItem(STYLEKEY, brew.style);
|
if(brew.style)
|
||||||
|
localStorage.setItem(STYLEKEY, brew.style);
|
||||||
localStorage.setItem(METAKEY, JSON.stringify({ 'renderer': brew.renderer, 'theme': brew.theme }));
|
localStorage.setItem(METAKEY, JSON.stringify({ 'renderer': brew.renderer, 'theme': brew.theme }));
|
||||||
},
|
},
|
||||||
componentWillUnmount : function() {
|
componentWillUnmount : function() {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ const _ = require('lodash');
|
|||||||
|
|
||||||
// Default properties for newly-created brews
|
// Default properties for newly-created brews
|
||||||
const DEFAULT_BREW = {
|
const DEFAULT_BREW = {
|
||||||
title : 'Untitled Brew',
|
title : '',
|
||||||
text : '',
|
text : '',
|
||||||
style : undefined,
|
style : undefined,
|
||||||
description : '',
|
description : '',
|
||||||
|
|||||||
Reference in New Issue
Block a user