mirror of
https://github.com/vuejs/babel-plugin-jsx.git
synced 2024-11-10 09:39:14 +08:00
filter JSXEmptyExpression
This commit is contained in:
parent
68da671c5a
commit
063af0e975
@ -14,7 +14,11 @@ const rootAttributes = ['class', 'style'];
|
||||
|
||||
const transformOn = (event = '') => `on${event[0].toUpperCase()}${event.substr(1)}`;
|
||||
|
||||
const filterEmpty = (value) => value !== undefined && value !== null;
|
||||
const filterEmpty = (value) => (
|
||||
value !== undefined
|
||||
&& value !== null
|
||||
&& !t.isJSXEmptyExpression(value)
|
||||
);
|
||||
|
||||
/**
|
||||
* Transform JSXMemberExpression to MemberExpression
|
||||
|
Loading…
Reference in New Issue
Block a user