fix cannot read "body" from undefined (#5387)

This commit is contained in:
Truman Gao
2026-02-18 10:43:14 -07:00
committed by GitHub
parent 0e752ab415
commit b62bc6f3b8

View File

@@ -8,13 +8,13 @@ const props = defineProps<{
watch( watch(
() => props.shown, () => props.shown,
(shown) => { (shown) => {
document.body.classList.toggle('floating-action-bar-shown', shown) document?.body.classList.toggle('floating-action-bar-shown', shown)
}, },
{ immediate: true }, { immediate: true },
) )
onUnmounted(() => { onUnmounted(() => {
document.body.classList.remove('floating-action-bar-shown') document?.body.classList.remove('floating-action-bar-shown')
}) })
</script> </script>