fix: @debug must use $state.snapshot() on value

pull/13690/head
adiguba 2 years ago
parent eb6488cd90
commit 978403beab

@ -10,7 +10,11 @@ import * as b from '../../../../utils/builders.js';
export function DebugTag(node, context) { export function DebugTag(node, context) {
const object = b.object( const object = b.object(
node.identifiers.map((identifier) => node.identifiers.map((identifier) =>
b.prop('init', identifier, /** @type {Expression} */ (context.visit(identifier))) b.prop(
'init',
identifier,
b.call('$.snapshot', /** @type {Expression} */ (context.visit(identifier)))
)
) )
); );

Loading…
Cancel
Save