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:
parent
332affa4a9
commit
710a70bf0e
1 changed files with 2 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
||||||
'use client'
|
'use client'
|
||||||
|
|
||||||
import { SandpackCodeViewer, SandpackFiles, SandpackProvider } from '@codesandbox/sandpack-react'
|
import { SandpackCodeViewer, SandpackFiles, SandpackProvider } from '@codesandbox/sandpack-react'
|
||||||
|
import { getOwnProperty } from '@tldraw/utils'
|
||||||
import { useTheme } from 'next-themes'
|
import { useTheme } from 'next-themes'
|
||||||
import React, {
|
import React, {
|
||||||
Fragment,
|
Fragment,
|
||||||
|
@ -134,7 +135,7 @@ export function Code({ children, ...props }: React.ComponentProps<'code'>) {
|
||||||
|
|
||||||
function finishCurrentIdentifier() {
|
function finishCurrentIdentifier() {
|
||||||
if (currentIdentifier) {
|
if (currentIdentifier) {
|
||||||
const link = codeLinks[currentIdentifier]
|
const link = getOwnProperty(codeLinks, currentIdentifier)
|
||||||
if (link) {
|
if (link) {
|
||||||
pushInCurrentSpan(
|
pushInCurrentSpan(
|
||||||
<A href={link} className="code-link">
|
<A href={link} className="code-link">
|
||||||
|
|
Loading…
Reference in a new issue