Skip to content

Commit 9677ca7

Browse files
committed
fix TS error for directory is null in nested function of createSfx function (createSfx.ts)
2 parents a1e035d + c56a5f7 commit 9677ca7

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/createSfx.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,8 @@ export function createSfx(
138138
directory = destination;
139139
else {
140140
const whenPath = getPath('when');
141-
if (whenPath) {
142-
directory = whenPath;
143-
} else {
144-
throw new Error('Path for "when" module not found!');
145-
}
141+
if (!whenPath) return reject('Path not found!');
142+
directory = whenPath;
146143
}
147144

148145
let SfxDirectory = join(directory, 'SfxPackages');

0 commit comments

Comments
 (0)