Skip to content

Commit b976396

Browse files
EinfachMxrcclaude
andcommitted
fix: use globalThis cast to avoid TS error for Office global
typeof Office causes a TS error in files without declare const Office. Use typeof (globalThis as any).Office instead. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 64fbe4d commit b976396

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

apps/web/src/components/powerpoint/PowerPointAddinClient.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ export function PowerPointAddinClient() {
249249
// Only check whether the Office script was loaded at all (typeof Office).
250250
// Office.context may not be set up yet at this point — initOfficeBridge
251251
// uses Office.onReady() internally which waits for full initialization.
252-
const officeScriptPresent = typeof Office !== "undefined";
252+
const officeScriptPresent = typeof (globalThis as any).Office !== "undefined";
253253

254254
if (!officeScriptPresent || !token || !selectedSessionId || isDemo) {
255255
setOfficeDetected(false);

0 commit comments

Comments
 (0)