Skip to content

Commit 88eec7c

Browse files
committedMay 29, 2019
chore: made condition strict
1 parent a2c49e2 commit 88eec7c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎packages/utils/scaffold.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@ import { Node } from "./types/NodePath";
1414

1515

1616
function mergeHandler(config: Config, transformations: string[]): [Config, string[]]{
17-
if(transformations.indexOf("topScope") === -1)
17+
if(!config["topScope"])
1818
{
1919
config["topScope"] = [
2020
`const merge = require('webpack-merge')`,
2121
`const ${config.merge[0]} = require(${config.merge[1]})`
2222
];
23+
transformations.push("topScope");
2324
} else {
2425
config.topScope.push(
2526
`const merge = require('webpack-merge')`,
@@ -29,7 +30,7 @@ function mergeHandler(config: Config, transformations: string[]): [Config, strin
2930

3031
config.merge = config.merge[0];
3132
transformations.push("merge", "topScope");
32-
return [config, transformations]
33+
return [config, transformations];
3334
}
3435

3536

0 commit comments

Comments
 (0)
Please sign in to comment.