diff --git a/javascript/RoommateList/RoommateList.jsx b/javascript/RoommateList/RoommateList.jsx index 051a483..f6237e9 100644 --- a/javascript/RoommateList/RoommateList.jsx +++ b/javascript/RoommateList/RoommateList.jsx @@ -1,6 +1,5 @@ 'use strict' import React, {Component} from 'react' -import PropTypes from 'prop-types' import RoommateRow from './RoommateRow.jsx' import Waiting from '../Mixin/Html/Waiting.jsx' import SearchBar from './SearchBar.jsx' @@ -12,6 +11,7 @@ import {profileLabel} from '../Mixin/Objects/ProfileData.js' export default class RoommateList extends Component { constructor(props) { super(props) + this.error = false this.state = { roommates: null, labels: { @@ -84,12 +84,20 @@ export default class RoommateList extends Component { } else { this.setState({roommates: []}) } + }.bind(this)).fail(function(){ + this.error = true + this.setState({roommates: []}) }.bind(this)) } render() { let rows + let message + if (this.error) { + message =