babel-plugin-import icon indicating copy to clipboard operation
babel-plugin-import copied to clipboard

feat: conditional expression supports comma operator

Open kayoch1n opened this issue 3 years ago • 1 comments

import { NewPage, OldPage } from "components"; // 使用按需加载的两个控件

let condition = 1, temp = '';
let Tag = condition? (temp = 'New', NewPage) : (temp = 'Old', OldPage); // 无法渲染

在条件表达式的 consequent 或者 alternate 部分使用了 comma opereator 的情况下,原来的代码仍然会导致渲染失败,类似这个issue

先前的这个 PR 对声明语句做了修复了,但是没有cover到其他表达式

kayoch1n avatar Aug 30 '21 15:08 kayoch1n

@sorrycc 打搅一下,有时间review一下不?

kayoch1n avatar Sep 02 '21 02:09 kayoch1n