mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-24 20:42:43 +00:00
Fix loading Style data from local storage, and add fix for Linter.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
/*eslint max-lines: ["warn", {"max": 300, "skipBlankLines": true, "skipComments": true}]*/
|
||||
require('./newPage.less');
|
||||
const React = require('react');
|
||||
const createClass = require('create-react-class');
|
||||
@@ -77,13 +78,13 @@ const NewPage = createClass({
|
||||
this.setState({
|
||||
brew : { text: brewStorage }
|
||||
});
|
||||
}
|
||||
};
|
||||
const styleStorage = localStorage.getItem(STYLEKEY);
|
||||
if(!this.props.brew.text && styleStorage){
|
||||
if(!this.props.brew.style && styleStorage){
|
||||
this.setState({
|
||||
brew : { style: styleStorage }
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
this.setState((prevState)=>({
|
||||
htmlErrors : Markdown.validate(prevState.brew.text)
|
||||
|
||||
Reference in New Issue
Block a user