Skip to content

Commit 94d0b08

Browse files
committed
tweak labels
1 parent 4105d05 commit 94d0b08

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/svelte/src/internal/client/dev/tracing.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,16 @@ function log_entry(signal, entry) {
4343
const type = (signal.f & DERIVED) !== 0 ? '$derived' : '$state';
4444
const current_reaction = /** @type {Reaction} */ (active_reaction);
4545
const dirty = signal.wv > current_reaction.wv || current_reaction.wv === 0;
46-
const { label: name } = signal;
46+
4747
const style = dirty
4848
? 'color: CornflowerBlue; font-weight: bold'
4949
: 'color: grey; font-weight: normal';
50+
5051
// eslint-disable-next-line no-console
5152
console.groupCollapsed(
52-
typeof name === 'string' ? `%c${name}${type}` : `%c${type}`,
53+
signal.label ? `%c${type}%c ${signal.label}` : `%c${type}%c`,
5354
style,
55+
dirty ? 'font-weight: normal' : style,
5456
typeof value === 'object' && value !== null && STATE_SYMBOL in value
5557
? snapshot(value, true)
5658
: value

0 commit comments

Comments
 (0)