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
{{ message }}
Repository navigation
Commit 6890ffc
Browse filesBrowse the repository at this point in the historyBrowse files
fix(define): throw on a non-optional read past an undefined member (#21827)
* fix: throw on a non-optional read past an undefined DefinePlugin member
A call whose callee chain reads an undefined member of a defined object had
its whole callee replaced, so `OBJ.MISSING.a?.()` was emitted as
`undefined?.()` and returned undefined where the source throws at `.a`. The
chain is now replaced only up to the undefined member, leaving the members
after it to read off `undefined` as they would natively.
Also covers the short-circuit and throwing paths for the `import.meta` chain
root and for `process.env`, the shape #21822 was reported against.
Refs #21822
* review: shorten the chain-cut comment and assert the chained-optional call
0 commit comments