From 9129d2f138f5cecefce8514cc697039f23f99dc5 Mon Sep 17 00:00:00 2001 From: ikalachy Date: Tue, 13 Feb 2024 09:54:06 +0200 Subject: [PATCH] fix: check that component wasn't instantiated (#10458) #10454 --- packages/svelte/src/internal/client/custom-element.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/svelte/src/internal/client/custom-element.js b/packages/svelte/src/internal/client/custom-element.js index bafdbc00f3..2502a58676 100644 --- a/packages/svelte/src/internal/client/custom-element.js +++ b/packages/svelte/src/internal/client/custom-element.js @@ -89,7 +89,7 @@ if (typeof HTMLElement === 'function') { if (!this.$$c) { // We wait one tick to let possible child slot elements be created/mounted await Promise.resolve(); - if (!this.$$cn) { + if (!this.$$cn || this.$$c) { return; } /** @param {string} name */