diff --git a/examples/full/lib/notion.ts b/examples/full/lib/notion.ts index 4e3c84a0b..9ba5ce6aa 100644 --- a/examples/full/lib/notion.ts +++ b/examples/full/lib/notion.ts @@ -28,5 +28,11 @@ export async function getPage(pageId: string): Promise { } export async function search(params: SearchParams): Promise { - return notion.search(params) + if (notion instanceof NotionAPI) { + return notion.search(params) + } else { + console.error( + 'NotionCompatAPI does not have a search method. Use NotionAPI instead.' + ) + } }