From 16c316b0e3084b1fa8826b0abb859748f57d8149 Mon Sep 17 00:00:00 2001 From: wheat Date: Thu, 12 Jan 2023 11:03:26 -0500 Subject: [PATCH] Update components/settings/SettingsFontSize.vue MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 三咲智子 Kevin Deng --- components/settings/SettingsFontSize.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/settings/SettingsFontSize.vue b/components/settings/SettingsFontSize.vue index 23073cc2..88e4a08c 100644 --- a/components/settings/SettingsFontSize.vue +++ b/components/settings/SettingsFontSize.vue @@ -5,9 +5,9 @@ import type { FontSize } from '~/types' const sizes = ['xs', 'sm', 'md', 'lg', 'xl'] as FontSize[] const fontSize = useFontSizeRef() -const setFontSize = (e: any) => { - if ('valueAsNumber' in e.target) - fontSize.value = sizes[e.target.valueAsNumber] +const setFontSize = (e: Event) => { + if (e.target && 'valueAsNumber' in e.target) + fontSize.value = sizes[e.target.valueAsNumber as number] }