From 710a70bf0e38df4e93131e535f38178e631c2807 Mon Sep 17 00:00:00 2001 From: alex Date: Tue, 9 Jul 2024 11:32:26 +0100 Subject: [PATCH] fix vec docs (#4107) Fix 500 error on vec docs because we were accessing prototype methods on an object ### Change type - [x] `other` --- apps/docs/components/mdx-components/code.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/docs/components/mdx-components/code.tsx b/apps/docs/components/mdx-components/code.tsx index fae8aa05b..d90b6c0fc 100644 --- a/apps/docs/components/mdx-components/code.tsx +++ b/apps/docs/components/mdx-components/code.tsx @@ -1,6 +1,7 @@ 'use client' import { SandpackCodeViewer, SandpackFiles, SandpackProvider } from '@codesandbox/sandpack-react' +import { getOwnProperty } from '@tldraw/utils' import { useTheme } from 'next-themes' import React, { Fragment, @@ -134,7 +135,7 @@ export function Code({ children, ...props }: React.ComponentProps<'code'>) { function finishCurrentIdentifier() { if (currentIdentifier) { - const link = codeLinks[currentIdentifier] + const link = getOwnProperty(codeLinks, currentIdentifier) if (link) { pushInCurrentSpan(