Fix for when request is null

This commit is contained in:
Gregory Schier 2020-06-30 15:32:58 -07:00
parent b0d0dd9359
commit f2060da23e

View File

@ -112,13 +112,19 @@ class SidebarRequestRow extends PureComponent {
}
componentDidMount() {
if (!this.props.request.name) {
const { request } = this.props;
if (request && !request.name) {
this._debouncedUpdateRenderedUrl(this.props);
}
}
componentWillUpdate(nextProps) {
if (nextProps.request.url !== this.props.request.url) {
if (!nextProps.request) {
return;
}
const requestUrl = this.props.request ? this.props.request.url : '';
if (nextProps.request.url !== requestUrl) {
this._debouncedUpdateRenderedUrl(nextProps);
}
}