From fb56bcae7ec62d0cdd6d285631e29897b4badaf9 Mon Sep 17 00:00:00 2001 From: etowahadams Date: Wed, 10 Jan 2024 10:54:11 -0500 Subject: [PATCH] fix: ? instead of undefined Co-authored-by: Sehi L'Yi --- src/core/gosling-component.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/gosling-component.tsx b/src/core/gosling-component.tsx index 0a7f4e7f..bedcbada 100644 --- a/src/core/gosling-component.tsx +++ b/src/core/gosling-component.tsx @@ -99,7 +99,8 @@ export const GoslingComponent = forwardRef((props, // TODO: add a `force` parameter since changing `linkingId` might not update vis const compile = useCallback( - (spec: gosling.GoslingSpec | undefined) => { + (altSpec?: gosling.GoslingSpec) => { + const spec = altSpec ?? props.spec; if (spec) { const valid = gosling.validateGoslingSpec(spec);