From 2ab931b4564ccbbac60e55bab6a775b4c54042b0 Mon Sep 17 00:00:00 2001 From: Chris Zarate Date: Wed, 23 Oct 2024 17:14:37 -0500 Subject: [PATCH] Fix error on selecting remote data (#176) --- src/blocks/remote-data-container/edit.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/blocks/remote-data-container/edit.tsx b/src/blocks/remote-data-container/edit.tsx index c9978c5d..350ac665 100644 --- a/src/blocks/remote-data-container/edit.tsx +++ b/src/blocks/remote-data-container/edit.tsx @@ -44,7 +44,10 @@ export function Edit( props: BlockEditProps< RemoteDataBlockAttributes > ) { .then( remoteData => { if ( remoteData ) { updateRemoteData( - { queryInputOverrides: props.attributes.remoteData.queryInputOverrides, ...remoteData }, + { + queryInputOverrides: props.attributes.remoteData?.queryInputOverrides, + ...remoteData, + }, insertBlocks ); }