0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-31 10:52:42 +00:00

update location of tags type rewrite

This commit is contained in:
Charlie Humphreys
2022-08-05 15:37:22 -05:00
parent c7cfa86205
commit ae9eef4fba
2 changed files with 4 additions and 4 deletions

View File

@@ -299,10 +299,7 @@ const Editor = createClass({
style={{ display: 'none' }} style={{ display: 'none' }}
rerenderParent={this.rerenderParent} /> rerenderParent={this.rerenderParent} />
<MetadataEditor <MetadataEditor
metadata={({ metadata={this.props.brew}
...this.props.brew,
tags : typeof this.props.brew.tags === 'string' ? [] : this.props.brew.tags
})}
onChange={this.props.onMetaChange} /> onChange={this.props.onMetaChange} />
</>; </>;
} }

View File

@@ -56,6 +56,9 @@ const getBrew = (accessType)=>{
throw 'Brew not found in Homebrewery database or Google Drive'; throw 'Brew not found in Homebrewery database or Google Drive';
} }
if(typeof stub.tags === 'string') {
stub.tags = [];
}
req.brew = stub; req.brew = stub;
next(); next();