Skip to content

Commit 97f022d

Browse files
committed
fix: forward host argument in presentationWrite setText handler
When setText is called with (null, value, host) for host-only text bindings, the presentationWrite handler was dropping the host argument. The deferred write queued setText(null, text) instead of setText(null, text, host), causing nodeValue to be assigned on null when the presentation frame replayed the write. Forward args[2] (the host) through to the deferred writer, and use it as the tracking target when args[0] is null.
1 parent 063ee74 commit 97f022d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎packages/octane/src/runtime.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24469,7 +24469,8 @@ export function presentationWrite<T>(
2446924469
if (kind === 'bindSignalText') return preparePresentationSignalBinding(args, frame, true) as T;
2447024470
if (kind === 'setText') {
2447124471
const text = coerceText(args[1]);
24472-
preparePresentationOperation(frame, args[0], 'text', () => writer(args[0], text));
24472+
const host = args[2];
24473+
preparePresentationOperation(frame, args[0] ?? host, 'text', () => writer(args[0], text, host));
2447324474
return undefined as T;
2447424475
}
2447524476
if (kind === 'bindSignalAttribute') return preparePresentationSignalBinding(args, frame) as T;

0 commit comments

Comments
 (0)