chore: add labels to more internal deriveds (#18050)

tiny QoL thing
pull/18057/head
Rich Harris 5 months ago committed by GitHub
parent 704e3bb5f0
commit a9530e5330
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -42,6 +42,7 @@ import { DEV } from 'esm-env';
import { derived_safe_equal } from '../../reactivity/deriveds.js';
import { current_batch } from '../../reactivity/batch.js';
import * as e from '../../errors.js';
import { tag } from '../../dev/tracing.js';
// When making substantive changes to this file, validate them with the each block stress test:
// https://svelte.dev/playground/1972b2cf46564476ad8c8c6405b23b7b
@ -205,6 +206,10 @@ export function each(node, flags, get_collection, get_key, render_fn, fallback_f
return is_array(collection) ? collection : collection == null ? [] : array_from(collection);
});
if (DEV) {
tag(each_array, '{#each ...}');
}
/** @type {V[]} */
var array;

@ -95,6 +95,10 @@ export class SvelteDate extends Date {
return date_proto[method].apply(this, args);
});
if (DEV) {
tag(d, `SvelteDate.${method}()`);
}
this.#deriveds.set(method, d);
set_active_reaction(reaction);

Loading…
Cancel
Save