From 4da7419b19c12670be7de4dfad27e508d059fefd Mon Sep 17 00:00:00 2001 From: Lorenzo Blasa Date: Thu, 28 Jul 2022 08:00:10 -0700 Subject: [PATCH] Dismiss set highlight calls for null elements Summary: ^ Reviewed By: mweststrate Differential Revision: D38238280 fbshipit-source-id: c48d8ff1c69b5c3d535ce050381ba91f1f405937 --- desktop/plugins/public/layout/Inspector.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/desktop/plugins/public/layout/Inspector.tsx b/desktop/plugins/public/layout/Inspector.tsx index a56e31b58..06684aa75 100644 --- a/desktop/plugins/public/layout/Inspector.tsx +++ b/desktop/plugins/public/layout/Inspector.tsx @@ -414,6 +414,9 @@ export default class Inspector extends Component { if (!this.props.client.isConnected) { return; } + if (key === undefined || key == null) { + return; + } this.props.client .call(this.call().SET_HIGHLIGHTED, { id: key,