Skip to content

Commit 3fde646

Browse files
committed
fix(): check that npm scripts exists before checking for properties.
1 parent 01112e9 commit 3fde646

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎lib/cli.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ Cli.runr = function runr(processArgv) {
188188
log.debug('\nNpm scripts:',npmScripts);
189189
log.debug('Gulpfile found:',gulpLoaded,'\n');
190190

191-
if(npmScripts.hasOwnProperty(taskName+':before')||npmScripts.hasOwnProperty(taskName+':after')){
191+
if(npmScripts&&(npmScripts.hasOwnProperty(taskName+':before')||npmScripts.hasOwnProperty(taskName+':after'))){
192192
returnCli.runWithNpmScripts(argv,task,rawCliArguments);
193193
}elseif(gulpLoaded){
194194
returnCli.runWithGulp(argv,task,rawCliArguments);

0 commit comments

Comments
 (0)