File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
apps/builder/src/utils/evaluateDynamicString Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 2
2
getStringSnippets ,
3
3
isDynamicStringSnippet ,
4
4
} from "@illa-public/dynamic-string"
5
+ import { merge } from "lodash-es"
5
6
import { ILLAEditorRuntimePropsCollectorInstance } from "../executionTreeHelper/runtimePropsCollector"
6
7
import { evalScript } from "./codeSandbox"
7
8
import { substituteDynamicBindingWithValues } from "./valueConverter"
@@ -32,10 +33,11 @@ export const getDynamicValue = (
32
33
dataTree : Record < string , any > ,
33
34
) => {
34
35
const { jsSnippets, stringSnippets } = getSnippets ( dynamicString )
35
- const calcContext = {
36
- ...dataTree ,
37
- ...ILLAEditorRuntimePropsCollectorInstance . getThirdPartyPackages ( ) ,
38
- }
36
+ const calcContext = merge (
37
+ { } ,
38
+ dataTree ,
39
+ ILLAEditorRuntimePropsCollectorInstance . getThirdPartyPackages ( ) ,
40
+ )
39
41
if ( stringSnippets . length ) {
40
42
let context : Record < string , unknown > = { }
41
43
const values = jsSnippets . map ( ( jsSnippet , index ) => {
You can’t perform that action at this time.
0 commit comments