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

Check host app, then parent, then app for options. #217

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ module.exports = {
// *Either* use the options for an addon which is consuming this, *or* for
// an app which is consuming this, but never *both* at the same time. The
// special case here is when testing an addon.
// In lazy loading engines, the host might be different from the parent, so we fall back to that one
var options = (app && app.options && app.options.sassOptions)
// In lazy loading engines, the host might be different from the parent, so check for that one, then fallback to parent, then to app.
var options = (hostApp && hostApp.options && hostApp.options.sassOptions)
|| (parent && parent.options && parent.options.sassOptions)
|| (hostApp && hostApp.options && hostApp.options.sassOptions)
|| (app && app.options && app.options.sassOptions)
|| {};

if (envConfig) {
Expand Down