sandpack icon indicating copy to clipboard operation
sandpack copied to clipboard

Calling onMount with svelte causes a crash

Open eulertour opened this issue 2 years ago • 1 comments

Bug report

Packages affected

  • [x] sandpack-client
  • [ ] sandpack-react

Description of the problem

Calling the onMount function from svelte causes a crash.

What steps can we take to reproduce the problem?

Visit the linked CodeSandbox

Link to sandbox: link

Your Environment

Software Name/Version
Sandpack-client version 2.6.7
Sandpack-react version N/A
Browser Chrome Version 114.0.5735.106
Operating System macOS Monterey Version 12.5

eulertour avatar Jun 14 '23 02:06 eulertour

Replacing the call to onMount() with the definition of onMount() works for some reason, but it's an undocumented hack: https://codesandbox.io/s/fervent-kilby-6qn3c8?file=/App.svelte

eulertour avatar Jun 14 '23 02:06 eulertour