Skip to content

Fix "allowMultiline" being undefined in some cases#1179

Merged
ljharb merged 1 commit intojsx-eslint:masterfrom
fatfisz:fix-undefined-allow-multiline
May 7, 2017
Merged

Fix "allowMultiline" being undefined in some cases#1179
ljharb merged 1 commit intojsx-eslint:masterfrom
fatfisz:fix-undefined-allow-multiline

Conversation

@fatfisz
Copy link
Copy Markdown
Contributor

@fatfisz fatfisz commented May 7, 2017

From comment #857 (comment):

Btw. I think there was a small bug: when only "spacing" was set in the extended options, the following line was setting "allowMultiline" to undefined:

var multiline = context.options[1] ? context.options[1].allowMultiline : true;

Then in all the following conditions !multiline was being checked, which yielded a different result than the > default true value would.

Now I'll be checking if the property exists on the config object (using the has package, I found it being used in other rules).

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants