link fe: make check less confusing

The only thing we care about is whether or not we have (any & all) data
about the submission. Using URL here is confusing because it conflates
with the prop, and checking the prop in the first place always gives the
same result.
This commit is contained in:
Fang 2020-02-06 20:15:22 +01:00
parent 2f1f9b9c56
commit d9f0d44e0c
No known key found for this signature in database
GPG Key ID: EB035760C1BBA972

View File

@ -26,7 +26,7 @@ export class LinkDetail extends Component {
componentDidMount() { componentDidMount() {
// if we have no preloaded data, and we aren't expecting it, get it // if we have no preloaded data, and we aren't expecting it, get it
if (!this.props.data.url || !this.props.url) { if (!this.state.data.title) {
api.getSubmission( api.getSubmission(
this.props.path, this.props.url, this.updateData.bind(this) this.props.path, this.props.url, this.updateData.bind(this)
); );