fix vec docs (#4107)

Fix 500 error on vec docs because we were accessing prototype methods on
an object

### Change type

- [x] `other`
This commit is contained in:
alex 2024-07-09 11:32:26 +01:00 committed by GitHub
parent 332affa4a9
commit 710a70bf0e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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(
<A href={link} className="code-link">