mirror of
https://github.com/ascribe/onion.git
synced 2025-02-14 21:10:27 +01:00
Fix 404 not being detected properly on piece and edition detail
This commit is contained in:
parent
bc7515ffe7
commit
587b58a500
@ -58,7 +58,8 @@ let EditionContainer = React.createClass({
|
||||
},
|
||||
|
||||
componentDidUpdate() {
|
||||
const { editionErr } = this.state.editionMeta;
|
||||
const { err: editionErr } = this.state.editionMeta;
|
||||
|
||||
if (editionErr && editionErr.json && editionErr.json.status === 404) {
|
||||
this.throws(new ResourceNotFoundError(getLangText("Oops, the edition you're looking for doesn't exist.")));
|
||||
}
|
||||
|
@ -96,9 +96,9 @@ let PieceContainer = React.createClass({
|
||||
},
|
||||
|
||||
componentDidUpdate() {
|
||||
const { pieceMeta: { err: pieceErr } } = this.state;
|
||||
const { err: pieceErr } = this.state.pieceMeta;
|
||||
|
||||
if (pieceErr && pieceErr.status === 404) {
|
||||
if (pieceErr && pieceErr.json && pieceErr.json.status === 404) {
|
||||
this.throws(new ResourceNotFoundError(getLangText("Oops, the piece you're looking for doesn't exist.")));
|
||||
}
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user