From f2060da23eb5d2cd19e6d77349a0869be1d2358d Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Tue, 30 Jun 2020 15:32:58 -0700 Subject: [PATCH] Fix for when request is null --- .../app/ui/components/sidebar/sidebar-request-row.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/insomnia-app/app/ui/components/sidebar/sidebar-request-row.js b/packages/insomnia-app/app/ui/components/sidebar/sidebar-request-row.js index 63321e834..f3cc00d34 100644 --- a/packages/insomnia-app/app/ui/components/sidebar/sidebar-request-row.js +++ b/packages/insomnia-app/app/ui/components/sidebar/sidebar-request-row.js @@ -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); } }