Skip to content

Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.

fix(ui): update DocFooter to check for slide presence before rendering (#6966)

白熱813c6e1db42a
diff --git a/packages/docs-ui/src/views/doc-footer/DocFooter.tsx b/packages/docs-ui/src/views/doc-footer/DocFooter.tsx
index d5b0136b2d..86c8b095c2 100644
--- a/packages/docs-ui/src/views/doc-footer/DocFooter.tsx
+++ b/packages/docs-ui/src/views/doc-footer/DocFooter.tsx
@@ -40,8 +40,9 @@ function DocFooterContent() {
export function DocFooter() {
const univerInstanceService = useDependency(IUniverInstanceService);
const workbook = useObservable(() => univerInstanceService.getCurrentTypeOfUnit$<Workbook>(UniverInstanceType.UNIVER_SHEET), undefined, undefined, []);
+ const slide = useObservable(() => univerInstanceService.getCurrentTypeOfUnit$(UniverInstanceType.UNIVER_SLIDE), undefined, undefined, []);
- if (workbook) {
+ if (workbook || slide) {
return null;
}