Skip to content

Commit 72d2636

Browse files
author
Rich Harris
committed
think i fixed it
1 parent 41d2394 commit 72d2636

File tree

1 file changed

+2
-1
lines changed
  • packages/kit/src/runtime/server/page

1 file changed

+2
-1
lines changed

packages/kit/src/runtime/server/page/render.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,10 +319,11 @@ export async function render_response({
319319

320320
const args = [`app`, `element`];
321321

322+
blocks.push(`const element = document.currentScript.parentElement;`);
323+
322324
if (page_config.ssr) {
323325
const serialized = { form: 'null', error: 'null' };
324326

325-
blocks.push(`const element = document.currentScript.parentElement;`);
326327
blocks.push(`const data = ${data};`);
327328

328329
if (form_value) {

0 commit comments

Comments
 (0)