Commit 0c38afd
committed
refactor: potential undefined access in getwebpackconfigpath
The function accesses `builder.options?.configPath` without verifying `builder.options` exists. While optional chaining prevents a crash, if `builder.options` is undefined, `webpackPath` becomes undefined and is returned — but the caller may expect a valid path. This can lead to runtime errors downstream when the path is used (e.g., in file system operations or webpack CLI invocation).
Signed-off-by: Zendy <50132805+zendy199x@users.noreply.github.com>1 parent 67b8bc7 commit 0c38afd
1 file changed
Lines changed: 12 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
39 | 45 | | |
| 46 | + | |
0 commit comments