Skip to content

Commit

Permalink
fix: Respect custom Ember module names. (#303)
Browse files Browse the repository at this point in the history
  • Loading branch information
amiller-gh authored Aug 2, 2019
1 parent fb0a7a0 commit 8732070
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/@css-blocks/ember-cli/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,11 @@ module.exports = {
_owners: new Set(),

_modulePrefix() {
let parent = this.parent;
let config = typeof parent.config === "function" ? parent.config() || {} : {};
let name = typeof parent.name === "function" ? parent.name() : parent.name;
return parent.modulePrefix || config.modulePrefix || name || "";
const parent = this.parent;
const config = typeof parent.config === "function" ? parent.config() || {} : {};
const name = typeof parent.name === "function" ? parent.name() : parent.name;
const moduleName = typeof parent.moduleName === "function" ? parent.moduleName() : parent.moduleName;
return moduleName || parent.modulePrefix || config.modulePrefix || name || "";
},

// Shared AST plugin implementation for Glimmer and Ember.
Expand Down

0 comments on commit 8732070

Please sign in to comment.