0
0
mirror of https://github.com/sveltejs/svelte.git synced 2024-12-01 01:11:24 +01:00

fix: correctly validate <svelte:component> with bind:this (#12368)

This commit is contained in:
Rich Harris 2024-07-09 11:26:45 -07:00 committed by GitHub
parent 529db97928
commit 1d8d38c8bd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 10 additions and 2 deletions

View File

@ -0,0 +1,5 @@
---
'svelte': patch
---
fix: correctly validate `<svelte:component>` with `bind:this`

View File

@ -56,4 +56,6 @@ export function bind_this(element_or_component = {}, update, get_value, get_part
});
};
});
return element_or_component;
}

View File

@ -12,8 +12,9 @@ function is_void(tag) {
}
/**
* @param {() => any} component_fn
* @returns {any}
* @template Component
* @param {() => Component} component_fn
* @returns {Component}
*/
export function validate_dynamic_component(component_fn) {
try {