mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-24 12:02:48 +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(STYLEKEY, brew.style);
|
||||
if(brew.style)
|
||||
localStorage.setItem(STYLEKEY, brew.style);
|
||||
localStorage.setItem(METAKEY, JSON.stringify({ 'renderer': brew.renderer, 'theme': brew.theme }));
|
||||
},
|
||||
componentWillUnmount : function() {
|
||||
|
||||
@@ -2,7 +2,7 @@ const _ = require('lodash');
|
||||
|
||||
// Default properties for newly-created brews
|
||||
const DEFAULT_BREW = {
|
||||
title : 'Untitled Brew',
|
||||
title : '',
|
||||
text : '',
|
||||
style : undefined,
|
||||
description : '',
|
||||
|
||||
Reference in New Issue
Block a user