refactor(web): drop duplicate viewport facts spread in webRuntimeFacts (#1928)

`webRuntimeFacts` spread `viewportRuntimeOperationFacts` twice in the same
object literal. Both spreads declared the same `setViewport` cell — the first
inlined `device.kind === 'device' ? available : openTargetKindUnavailable`,
the second passed `browserDevice`, which is defined as exactly that
expression — so the second silently won and the first was dead.

Keep the `browserDevice` spread, which sits next to the other cells reading
the same value. Behavior-neutral: the resulting facts object is unchanged.
This commit is contained in:
Michał Pierzchała
2026-08-21 08:48:14 +02:00
committed by GitHub
parent 6911274952
commit 6604746d49
-3
View File
@@ -254,9 +254,6 @@ function webRuntimeFacts(
findText: openTargetKindUnavailable,
findSelector: openTargetKindUnavailable,
}),
...viewportRuntimeOperationFacts({
setViewport: device.kind === 'device' ? available : openTargetKindUnavailable,
}),
...screenshotRuntimeOperationFacts({ capture: browserDevice }),
...viewportRuntimeOperationFacts({ setViewport: browserDevice }),
// The web backend has no point-addressed read: `get` answers from the captured DOM tree,