fix: fix possible null exception with worker_threads pools
[poolifier.git] / src / pools / utils.ts
index e08b31aa838537c1ceee37f284ff39ac53960308..eb800c4ab50f9d39e2b6fc98ebb4cf39bfc134b5 100644 (file)
@@ -9,13 +9,6 @@ import type { TasksQueueOptions } from './pool'
 import type { IWorker, MeasurementStatistics } from './worker'
 
 export const checkFilePath = (filePath: string): void => {
-  if (
-    filePath == null ||
-    typeof filePath !== 'string' ||
-    (typeof filePath === 'string' && filePath.trim().length === 0)
-  ) {
-    throw new Error('Please specify a file with a worker implementation')
-  }
   if (!existsSync(filePath)) {
     throw new Error(`Cannot find the worker file '${filePath}'`)
   }