Skip to content

Commit f6f839f

Browse files
authored
refactor!: address ToDos (#151)
1 parent be35370 commit f6f839f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

projects/material-css-vars/src/lib/material-css-vars.service.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export class MaterialCssVarsService {
4242
primary = "#03a9f4";
4343
accent = "#e91e63";
4444
warn = "#f44336";
45-
isDarkTheme = false; // ToDo: make this attribute optional in next major version
45+
isDarkTheme?: boolean;
4646
contrastColorThresholdPrimary: HueValue = "400";
4747
contrastColorThresholdAccent: HueValue = "400";
4848
contrastColorThresholdWarn: HueValue = "400";
@@ -165,9 +165,7 @@ export class MaterialCssVarsService {
165165
threshold: HueValue,
166166
palettePrefix: MatCssPalettePrefix,
167167
) {
168-
// ToDo: address this lint error
169-
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
170-
if (!threshold || !palettePrefix || this.isAutoContrast) {
168+
if (this.isAutoContrast) {
171169
return;
172170
}
173171
let color = MaterialCssVarsService.DARK_TEXT_VAR;

0 commit comments

Comments
 (0)