mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-04 16:52:38 +00:00
update metadata editor to include error handling
This commit is contained in:
@@ -19,7 +19,7 @@ const BrewItem = createClass({
|
||||
authors : [],
|
||||
stubbed : true
|
||||
},
|
||||
reportError : null
|
||||
reportError : ()=>{}
|
||||
};
|
||||
},
|
||||
|
||||
@@ -35,7 +35,7 @@ const BrewItem = createClass({
|
||||
request.delete(`/api/${this.props.brew.googleId ?? ''}${this.props.brew.editId}`)
|
||||
.send()
|
||||
.end((err, res)=>{
|
||||
if(err && this.props.reportError) {
|
||||
if(err) {
|
||||
this.props.reportError(err.response);
|
||||
} else {
|
||||
location.reload();
|
||||
|
||||
Reference in New Issue
Block a user