langgenius / dify

Dify is an open-source LLM app development platform. Dify's intuitive interface combines AI workflow, RAG pipeline, agent capabilities, model management, observability features and more, letting you quickly go from prototype to production.
https://dify.ai
Other
50.28k stars 7.2k forks source link

Adding else condition branch error #9719

Open luxi001-aaa opened 1 week ago

luxi001-aaa commented 1 week ago

Self Checks

Dify version

0.10.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

1729676672827 1729676672833

✔️ Expected Behavior

No response

❌ Actual Behavior

No response

dosubot[bot] commented 1 week ago

@luxi001-aaa Hello there! I'm here to help you with any bugs, questions, or contributions you may have for Dify. I'll do my best to assist you while waiting for a human maintainer.

The error message "Uncaught TypeError: Cannot add property 1, object is not extensible" typically occurs in JavaScript when you try to add a property to an object that has been made non-extensible. This can happen if the object has been frozen using Object.freeze() or sealed using Object.seal(), or if Object.preventExtensions() has been called on it.

In the context of the Dify platform, this error might be related to how the '+ ELIF' and 'ELSE' functionalities are implemented in the codebase. The IfElseNode component in the Dify codebase handles these functionalities by mapping over a cases array to render 'IF' and 'ELIF' conditions, and separately rendering the 'ELSE' condition [1].

To resolve this issue, you should check the part of the code where the object is being modified to ensure that it is not non-extensible. Look for any use of Object.freeze(), Object.seal(), or Object.preventExtensions() that might be affecting the object in question. If you have control over the code, you might need to adjust how the object is being handled to allow for modifications.

To continue talking to Dosu, mention @dosu.

crazywoola commented 1 week ago

Please provide the DSL

luxi001-aaa commented 1 week ago

I found a rule that in the process of workflow orchestration, the preview debugging robot functions normally when it is opened, and cannot add else functions when it is closed, which is the case in any process

请提供 DSL