chore: untrack keyed validation logic (#9618)

* untrack validation logic

* chore: untrack keyed validation logic
pull/9621/head
Dominic Gannaway 1 year ago committed by GitHub
parent 8118efd115
commit c22ebffb00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,5 @@
---
'svelte': patch
---
chore: untrack keyed validation logic

@ -1,3 +1,4 @@
import { untrack } from './runtime.js';
import { is_array } from './utils.js';
/** regex of all html void element names */
@ -69,7 +70,7 @@ export function validate_dynamic_element_tag(tag_fn) {
*/
export function validate_each_keys(collection, key_fn) {
const keys = new Map();
const maybe_array = collection();
const maybe_array = untrack(() => collection());
const array = is_array(maybe_array)
? maybe_array
: maybe_array == null

Loading…
Cancel
Save