fix: clearData函数内使用renderRawData替代render以绕开自定义Adapter插件的adapterIn方法 #2267
+2
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
如果使用Adapter插件的话,render函数会收到的的数据的类型或结构不一定和logicflow自身的重合,如果把这个空对象传给render函数,render函数再传给adapterIn函数,不能保证可以正确处理
常见的触发场景为单独调用clearData或调用destroy方法,destroy内部调用clearData
另外,sites/docs和example内都在直接调用render({}),不知是否需要修改,以及adapterIn函数文档是否需要提及一下这个隐患