0
0
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:
Trevor Buckner
2023-01-04 20:58:29 -05:00
parent e02bde5eed
commit b717059a39
2 changed files with 3 additions and 2 deletions

View File

@@ -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() {

View File

@@ -2,7 +2,7 @@ const _ = require('lodash');
// Default properties for newly-created brews
const DEFAULT_BREW = {
title : 'Untitled Brew',
title : '',
text : '',
style : undefined,
description : '',