fix(client): lint conformance for the preference services
Replace optional chains on always-present globals with the repo's typeof guards (store.ts precedent), drop the non-null assertion by failing loud on an impossible registry miss, and fix two arrow-parens slips; cover the no-localStorage boot path in both service suites.
This commit is contained in:
@@ -107,7 +107,7 @@ export function apply(ctx: ClientContext): void {
|
||||
ctx.effect(() => {
|
||||
const presenter = new ThemePresenter()
|
||||
presenter.apply(ctx.theme.getTheme())
|
||||
const off = ctx.on('theme/change', snapshot => { presenter.apply(snapshot) })
|
||||
const off = ctx.on('theme/change', (snapshot) => { presenter.apply(snapshot) })
|
||||
return () => {
|
||||
off()
|
||||
presenter.dispose()
|
||||
|
||||
Reference in New Issue
Block a user