Skip to content

Commit

Permalink
fix(supernova): update all options (#391)
Browse files Browse the repository at this point in the history
  • Loading branch information
miralemd committed Apr 1, 2020
1 parent 63d8cc1 commit f9d5e4b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions apis/supernova/__tests__/unit/creator.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,12 @@ describe('creator', () => {
},
});
expect(hooked.run.callCount).to.equal(3);

expect(c.context.options).to.eql({
rtl: false,
foo,
ref,
});
});

it('should run when theme name has changed', () => {
Expand Down
2 changes: 1 addition & 1 deletion apis/supernova/src/creator.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ function createWithHooks(generator, opts, galaxy) {
const op = {};
let opChanged = false;
Object.keys(r.options).forEach(key => {
op[key] = r.options[key];
if (this.context.options[key] !== r.options[key]) {
op[key] = r.options[key];
opChanged = true;
}
});
Expand Down

0 comments on commit f9d5e4b

Please sign in to comment.