Skip to content

Commit 3c2195f

Browse files
authored
Merge pull request #4708 from NativeScript/fatme/fix-source-of-undefined
fix: fix cannot read property sourceMap of undefined
2 parents 1d05dae + 91415e9 commit 3c2195f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/services/webpack/webpack-compiler-service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ export class WebpackCompilerService extends EventEmitter implements IWebpackComp
138138

139139
envData.verbose = this.$logger.isVerbose();
140140
envData.production = prepareData.release;
141-
if (prepareData.env.sourceMap === false || prepareData.env.sourceMap === 'false') {
141+
if (prepareData.env && (prepareData.env.sourceMap === false || prepareData.env.sourceMap === 'false')) {
142142
delete envData.sourceMap;
143143
} else if (!prepareData.release) {
144144
envData.sourceMap = true;

0 commit comments

Comments
 (0)