You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(runner): inline data URIs before handling write redirects (#1911)
fix(runner): inline data URIs before handling write redirects
Move data URI inlining logic to occur before write redirect (alias)
handling in normalizeAndDiff. This ensures the correct evaluation order
when a data URI contains a redirect link.
Previously, when newValue was a data URI containing a redirect, the
code would:
1. Check currentValue for redirects (line 290)
2. Follow currentValue redirect if present
3. Process data URI inlining later (line 318)
This caused the redirect within the data URI to be written to the wrong
location - it would follow the currentValue redirect first, then inline
the data URI, resulting in the redirect being written to the destination
of the currentValue alias instead of to the intended target.
The fix reorders the logic so data URIs are inlined immediately after
unwrapping proxies and cells (line 212), before any redirect handling.
This preserves the invariant that redirect handling at line 290 only
applies when newValue is not itself an alias.
The order is now:
1. Unwrap proxies/cells
2. Inline data URIs (exposing any contained redirects)
3. Handle redirects in newValue
4. Handle redirects in currentValue
This ensures redirects contained in data URIs are properly recognized
and handled as part of newValue, not incorrectly written through a
currentValue redirect.
0 commit comments