kyoty opened a new pull request #5826: URL: https://github.com/apache/dolphinscheduler/pull/5826
<!--Thanks very much for contributing to Apache DolphinScheduler. Please review https://dolphinscheduler.apache.org/en-us/community/development/pull-request.html before opening a pull request.--> ## Purpose of the pull request Fix #5825 Close #5825 ## Brief change log + enhance the if condition in the latest dev branch, [mr.vue#L229](https://github.com/apache/dolphinscheduler/blob/1f0c67bfb772f46a0e7d6289b13a499aae403fe3/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/mr.vue#L229) `else if (element.children != null) ` changes to `else if (element.children !== null) ` According to the doc in MDN:https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Equality_comparisons_and_sameness ```javascript // this would be true console.log(undefined !== null) ``` `undefind` can run into the `else if` statement, it would cause the code to throw an excpetion. so I change `else if (element.children !== null)` to `else if (element.children)` + Since the code for loading resource lists in flink task, mapreduce task, etc are exactly the same, I try to refactor the js by extracting the common code to a seperate js so the common part can be updated only one time. ## Verify this pull request Manually verified the change by testing locally. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
