mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-08 14:02:41 +00:00
Merge pull request #1453 from G-Ambatte/modifyTitleOfClonedBrew
Prepend 'CLONE:- ' to title of cloned brew
This commit is contained in:
@@ -69,16 +69,15 @@ const NewPage = createClass({
|
||||
const brewStorage = localStorage.getItem(BREWKEY);
|
||||
const styleStorage = localStorage.getItem(STYLEKEY);
|
||||
|
||||
const brew = this.state.brew;
|
||||
|
||||
if(!this.props.brew.text || !this.props.brew.style){
|
||||
this.setState({
|
||||
brew : {
|
||||
text : this.props.brew.text || (brewStorage ?? ''),
|
||||
style : this.props.brew.style || (styleStorage ?? undefined)
|
||||
}
|
||||
});
|
||||
brew.text = this.props.brew.text || (brewStorage ?? '');
|
||||
brew.style = this.props.brew.style || (styleStorage ?? undefined);
|
||||
}
|
||||
|
||||
this.setState((prevState)=>({
|
||||
brew : brew,
|
||||
htmlErrors : Markdown.validate(prevState.brew.text)
|
||||
}));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user