From 779fcf4fc65bc8a6cdb68b3746033c9dc178760c Mon Sep 17 00:00:00 2001 From: Quinn Dougherty Date: Thu, 28 Jul 2022 11:07:32 -0400 Subject: [PATCH] inherit props to `runPartial` --- .../components/SquiggleEditorWithImportedBindings.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/components/src/components/SquiggleEditorWithImportedBindings.tsx b/packages/components/src/components/SquiggleEditorWithImportedBindings.tsx index b04706a3..5dcc3241 100644 --- a/packages/components/src/components/SquiggleEditorWithImportedBindings.tsx +++ b/packages/components/src/components/SquiggleEditorWithImportedBindings.tsx @@ -34,7 +34,14 @@ export const SquiggleEditorWithImportedBindings: React.FC< let contents = await fetch(fileName).then((response) => { return response.text(); }); - setBindingsResult(runPartial(contents)); + setBindingsResult( + runPartial( + contents, + editorProps.bindings, + editorProps.environment, + editorProps.jsImports + ) + ); } retrieveBindings(bindingsImportUrl); }, [bindingsImportUrl]);