javascript-obfuscator / javascript-obfuscator/webpack-obfuscator
cannot read property of undefined reading sourceAndMap
- Dominant language
- TypeScript
- Stars
- 928
- Forks
- 92
- PR merge metrics
- No merged PRs in 30d
Description
Obfuscator version used: 4.0.2
Node version used: 16.13.2
Webpack-obfuscator used: 3.5.1
private extractSourceAndSourceMap(asset: any): { inputSource: string, inputSourceMap: RawSourceMap } {
if (asset.sourceAndMap) { // this place
const { source, map } = asset.sourceAndMap();
return { inputSource: source, inputSourceMap: map };
} else {
return {
inputSource: asset.source(),
inputSourceMap: asset.map()
}
}
}
Contributor guide
No contributing guide indexed for this repository
Research direction
The issue identifies extractSourceAndSourceMap and the asset.sourceAndMap access, but names no file or test. Start by reproducing the error with Obfuscator 4.0.2, Node 16.13.2, and webpack-obfuscator 3.5.1, then trace the asset passed to this method. Done means the undefined-property failure is resolved and the affected behavior is verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, webpack
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100