File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ module.exports = {
36
36
return node . properties . find ( prop => {
37
37
if ( prop . type === 'Property' ) {
38
38
return prop . key . name === propName ;
39
- } else if ( prop . type === 'ExperimentalSpreadProperty' ) {
39
+ } else if ( prop . type === 'ExperimentalSpreadProperty' || prop . type === 'SpreadElement' ) {
40
40
const variable = findSpreadVariable ( prop . argument . name ) ;
41
41
if ( variable && variable . defs . length && variable . defs [ 0 ] . node . init ) {
42
42
if ( seenProps . indexOf ( prop . argument . name ) > - 1 ) {
@@ -74,7 +74,7 @@ module.exports = {
74
74
* @returns {Boolean } True if node is a line break, false if not
75
75
*/
76
76
function isLineBreak ( node ) {
77
- const isLiteral = node . type === 'Literal' ;
77
+ const isLiteral = node . type === 'Literal' || node . type === 'JSXText' ;
78
78
const isMultiline = node . loc . start . line !== node . loc . end . line ;
79
79
const isWhiteSpaces = / ^ \s * $ / . test ( node . value ) ;
80
80
You can’t perform that action at this time.
0 commit comments