fix premature source close

This commit is contained in:
Lachlan Kermode
2018-12-26 10:31:06 +01:00
parent 1d6988edce
commit fb925aecdd
3 changed files with 9 additions and 2 deletions

View File

@@ -25,6 +25,13 @@ const CardSource = ({ source, isLoading, onClickHandler }) => {
}
}
if (typeof source !== 'object') {
return (
<div className="card-source">
<div>Error: this source was not found</div>
</div>
)
}
return (
<div className="card-source">
{isLoading