fix(core): handle empty list of cacheable targets

This commit is contained in:
Victor Savkin 2020-06-08 11:25:04 -04:00
parent 90f099cb58
commit acf92e4e2b

View File

@ -16,7 +16,9 @@ class CacheConfig {
const cacheable = const cacheable =
this.options.cacheableOperations || this.options.cacheableTargets; this.options.cacheableOperations || this.options.cacheableTargets;
return ( return (
cacheable.indexOf(task.target.target) > -1 && !this.longRunningTask(task) cacheable &&
cacheable.indexOf(task.target.target) > -1 &&
!this.longRunningTask(task)
); );
} }