Skip to content

Commit ab587bf

Browse files
committed
fix?
1 parent 0300fbc commit ab587bf

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/svelte/src/internal/client/render.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,10 @@ export function hydrate(component, options) {
137137
return /** @type {Exports} */ (instance);
138138
} catch (error) {
139139
// re-throw Svelte errors - they are certainly not related to hydration
140-
if (error instanceof Error && error.message.includes('https://svelte.dev/e/')) {
140+
if (
141+
error instanceof Error &&
142+
error.message.split('\n').some((line) => line.startsWith('https://svelte.dev/e/'))
143+
) {
141144
throw error;
142145
}
143146
if (error !== HYDRATION_ERROR) {

0 commit comments

Comments
 (0)