Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/composables/useIsDarkTheme/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ import type { ComputedRef, InjectionKey } from 'vue'
*
* @private
*/
export const INJECTION_KEY_THEME: InjectionKey<ComputedRef<'light' | 'dark' | ''>> = Symbol.for('nc:theme:enforced')
export const INJECTION_KEY_THEME: InjectionKey<ComputedRef<'light' | 'dark' | ''> | undefined> = Symbol.for('nc:theme:enforced')
2 changes: 1 addition & 1 deletion src/composables/useIsDarkTheme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const useInternalIsDarkTheme = createSharedComposable(() => useIsDarkThemeElemen
*/
export function useIsDarkTheme(): DeepReadonly<Ref<boolean>> {
const isDarkTheme = useInternalIsDarkTheme()
const enforcedTheme = inject(INJECTION_KEY_THEME)
const enforcedTheme = inject(INJECTION_KEY_THEME, undefined)

return computed(() => {
if (enforcedTheme?.value) {
Expand Down
Loading