mirror of https://github.com/sveltejs/svelte
fix: ensure `$inspect` after top level await doesn't break builds (#17943)
Turn empty statements into empty thunks so that `$.run/$$render.run` don't throw (as they expect functions as input) Fixes #17514pull/17935/merge
parent
d4bd6ad8f3
commit
b472171de6
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'svelte': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: ensure `$inspect` after top level await doesn't break builds
|
||||||
@ -0,0 +1,10 @@
|
|||||||
|
import { tick } from 'svelte';
|
||||||
|
import { test } from '../../test';
|
||||||
|
|
||||||
|
export default test({
|
||||||
|
ssrHtml: 'works',
|
||||||
|
async test({ assert, target }) {
|
||||||
|
await tick();
|
||||||
|
assert.htmlEqual(target.innerHTML, 'works');
|
||||||
|
}
|
||||||
|
});
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
const test = async () => "test";
|
||||||
|
await test();
|
||||||
|
$inspect("inspect after await shouldnt break builds");
|
||||||
|
</script>
|
||||||
|
|
||||||
|
works
|
||||||
Loading…
Reference in new issue