Skip to content

Commit feafbc0

Browse files
committed
fix: replace ternary nesting with if/else
1 parent c556823 commit feafbc0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

MeiliSearchBox.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,13 @@ export default {
8282
},
8383
8484
updateTheme(options) {
85-
this.theme = options.enableDarkMode === true ? 'dark' : options.enableDarkMode === false ? 'light' : 'auto'
85+
if (options.enableDarkMode === true) {
86+
this.theme = 'dark'
87+
} else if (options.enableDarkMode === false) {
88+
this.theme = 'light'
89+
} else {
90+
this.theme = 'auto'
91+
}
8692
}
8793
}
8894
}

0 commit comments

Comments
 (0)