提交 d571d32f 编写于 作者: M Map1en_

replace optional chaining

上级 058d030e
......@@ -149,7 +149,7 @@ class TreeSeriesModel extends SeriesModel<TreeSeriesOption> {
function beforeLink(nodeData: List) {
nodeData.wrapMethod('getItemModel', function (model, idx) {
const node = tree.getNodeByDataIndex(idx);
if (!node?.children.length || !node.isExpand) {
if (!(node && node.children.length && node.isExpand)) {
model.parentModel = leavesModel;
}
return model;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册