🔧 fix(constants.ts): fix indentation issue in CODE_DICT_DIALOG_SUBTITLE constant
🔧 fix(constants.ts): update CODE_DICT_DIALOG_SUBTITLE constant to include information about using eval() function 🔧 fix(reactflowUtils.ts): add check to convertObjToArray function to return the input if it is already an array
This commit is contained in:
parent
46601245e1
commit
4b61a582ba
2 changed files with 5 additions and 2 deletions
|
|
@ -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(<input-value>). 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
|
||||
|
|
|
|||
|
|
@ -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)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue