diff --git a/src/frontend/src/constants/constants.ts b/src/frontend/src/constants/constants.ts index ab87f1e01..2e48b5b32 100644 --- a/src/frontend/src/constants/constants.ts +++ b/src/frontend/src/constants/constants.ts @@ -115,9 +115,9 @@ export const EDIT_DIALOG_SUBTITLE = export const CODE_PROMPT_DIALOG_SUBTITLE = "Edit your Python code. This code snippet accepts module import and a single function definition. Make sure that your function returns a string."; - + export const CODE_DICT_DIALOG_SUBTITLE = -"Edit your dictionary. This dialog allows you to create your own customized dictionary. You can add as many key-value pairs as you want."; + "Edit your dictionary. This dialog allows you to create your own customized dictionary. You can add as many key-value pairs as you want. The editor uses eval(). While in edit mode, you can enter ({}) or ([]), which will cause the result of eval to become a new object or array."; /** * The base text for subtitle of Prompt Dialog diff --git a/src/frontend/src/utils/reactflowUtils.ts b/src/frontend/src/utils/reactflowUtils.ts index aebf36eab..da503befc 100644 --- a/src/frontend/src/utils/reactflowUtils.ts +++ b/src/frontend/src/utils/reactflowUtils.ts @@ -292,6 +292,9 @@ export function getConnectedNodes( } export function convertObjToArray(singleObject) { + + if (Array.isArray(singleObject)) return singleObject; + let arrConverted: any = []; for (const key in singleObject) { if (singleObject.hasOwnProperty(key)) {