Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo in Istanbul loader example #136

Merged
merged 1 commit into from
Jun 30, 2017

Conversation

TerrenceLJones
Copy link
Contributor

It seems like the closing ) of the concat is miss-placed here.

In the previous example

const somethingTrue = true;

var module = {
    loaders: [].concat(
        somethingTrue ? {
	    y: 'y'
	} : [],
    ), // note parens placement
    {
	z: 'z'
    }
}

would result in => Uncaught SyntaxError: Unexpected token '{'

In this proposed change:

const x = true;

var module = {
    loaders: [].concat(
        somethingTrue ? {
	    y: 'y'
	} : [],
	{
	    x: 'x'
        }
    ) // note parens placement
}

would result in => Object {loaders: Array(2)}

Am I missing something in the previous version?

@zinserjan zinserjan merged commit 4d439bf into zinserjan:master Jun 30, 2017
@zinserjan
Copy link
Owner

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants