mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 06:39:48 +00:00
Fix for when request is null
This commit is contained in:
parent
b0d0dd9359
commit
f2060da23e
@ -112,13 +112,19 @@ class SidebarRequestRow extends PureComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
if (!this.props.request.name) {
|
const { request } = this.props;
|
||||||
|
if (request && !request.name) {
|
||||||
this._debouncedUpdateRenderedUrl(this.props);
|
this._debouncedUpdateRenderedUrl(this.props);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillUpdate(nextProps) {
|
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);
|
this._debouncedUpdateRenderedUrl(nextProps);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user