mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-08 11:52:44 +00:00
Merge pull request #2308 from jeddai/fix-new-print-page
add elvis to handle missing metaStorage
This commit is contained in:
@@ -84,6 +84,11 @@ const NewPage = createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
componentDidMount : function() {
|
componentDidMount : function() {
|
||||||
|
localStorage.setItem(BREWKEY, this.state.brew.text);
|
||||||
|
localStorage.setItem(STYLEKEY, this.state.brew.style);
|
||||||
|
localStorage.setItem(METAKEY, JSON.stringify({
|
||||||
|
'renderer' : this.state.brew.renderer
|
||||||
|
}));
|
||||||
document.addEventListener('keydown', this.handleControlKeys);
|
document.addEventListener('keydown', this.handleControlKeys);
|
||||||
},
|
},
|
||||||
componentWillUnmount : function() {
|
componentWillUnmount : function() {
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ const PrintPage = createClass({
|
|||||||
brew : {
|
brew : {
|
||||||
text : brewStorage,
|
text : brewStorage,
|
||||||
style : styleStorage,
|
style : styleStorage,
|
||||||
renderer : metaStorage.renderer || 'legacy'
|
renderer : metaStorage?.renderer || 'legacy'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user