Skip to content

Commit

Permalink
fix: TypeError: window.meta is not a function
Browse files Browse the repository at this point in the history
  • Loading branch information
linonetwo committed Feb 7, 2024
1 parent b5376bf commit 8c8cbb4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/services/wiki/plugin/ipcSyncAdaptor/ipc-syncadaptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ class TidGiIPCSyncAdaptor {
if ($tw.browser && typeof window !== 'undefined') {
const isInTidGi = typeof document !== 'undefined' && document?.location?.protocol?.startsWith('tidgi');
const servicesExposed = Boolean(window.service?.wiki);
const hasWorkspaceIDinMeta = Boolean((window.meta() as WindowMeta[WindowNames.view] | undefined)?.workspaceID);
const hasWorkspaceIDinMeta = Boolean((window.meta?.() as WindowMeta[WindowNames.view] | undefined)?.workspaceID);
if (isInTidGi && servicesExposed && hasWorkspaceIDinMeta) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
exports.adaptorClass = TidGiIPCSyncAdaptor;
Expand Down

0 comments on commit 8c8cbb4

Please sign in to comment.