Skip to content

Fix errors using loader with webpack 4.2 #1200

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

Open
wants to merge 10 commits into
base: 8.x
Choose a base branch
from

Conversation

cseufert
Copy link

No description provided.

@@ -33,7 +33,7 @@ module.exports = function (css, map) {
var cb = this.async()

var query = loaderUtils.getOptions(this) || {}
var options = this.options.vue || {}
var options = this.options && this.options.vue || {}
Copy link

@davidpelayo davidpelayo Apr 27, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In direct assignments you may be have to double coerce the first logic comparison to ensure it returns a boolean and fallbacks to {} if resolves to false. So it would be:

var options = (this.options && this.options.vue) || {}

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