Open tamtakoe opened 9 months ago
Seeing this error in devtools:
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'substring')
at s (webcontainer.a8c70b9797689ab630bc39693935365c46b0aa9d.js:8:66054)
at webcontainer.a8c70b9797689ab630bc39693935365c46b0aa9d.js:8:224205
at Array.map (<anonymous>)
at Nt.collectErrors (webcontainer.a8c70b9797689ab630bc39693935365c46b0aa9d.js:8:224187)
at webcontainer.a8c70b9797689ab630bc39693935365c46b0aa9d.js:8:182692
Good morning! Any update on this issue? I've run into the same issue while trying to embed this github project into one of my blog posts.
It's a pretty straightforward react component that I am using to embed the project:
'use client'
import { useRef, useEffect } from 'react'
import sdk from '@stackblitz/sdk'
const EMBED_CONTAINER_ID = 'stackblitz-embed-container'
export const StackblitzEmbed = ({ projectId }) => {
useEffect(() => {
sdk.embedGithubProject(EMBED_CONTAINER_ID, 'drew-codes/angular-snax', {
height: 500,
openFile: ['projects/deferrable-views-demo/src/app/app.component.html'],
view: 'preview',
clickToLoad: true,
})
}, [])
return <div id={EMBED_CONTAINER_ID} />
}
https://stackblitz.com/edit/stackblitz-starters-b37cw2?file=src%2Findex.html