Skip to content

Commit

Permalink
fix(esl-media-query): fix ESLMediaRuleList.prototype.default type
Browse files Browse the repository at this point in the history
  • Loading branch information
ala-n committed Jan 10, 2022
1 parent 83d8ada commit 0ec7ef3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/modules/esl-media-query/core/esl-media-rule-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export class ESLMediaRuleList<T = any> extends Observable<RuleChangedCallback<T>
return Object.assign({}, this.default.payload || {}, value);
}

/** {@link ESLMediaRule} that is used as a default */
/** {@link ESLMediaRule} that is used as a default rule */
public get default(): ESLMediaRule<T | undefined> | undefined {
return this._default;
}
Expand Down
4 changes: 2 additions & 2 deletions src/modules/esl-media-query/test/esl-media-rule-list.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ describe('ESLMediaRuleList', () => {
const mrl = ESLMediaRuleList.parse('123');
expect(mrl.rules.length).toBe(1);
expect(mrl.default).toBeDefined();
expect(mrl.default.default).toBe(true);
expect(mrl.default.payload).toBe('123');
expect(mrl.default?.default).toBe(true);
expect(mrl.default?.payload).toBe('123');

expect(mrl.active).toBeDefined();
expect(mrl.activeValue).toBe('123');
Expand Down

0 comments on commit 0ec7ef3

Please sign in to comment.