repositories
/
poolifier.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0eee77c
)
fix: test task function name only if the received from workers
author
Jérôme Benoit
<jerome.benoit@sap.com>
Tue, 15 Aug 2023 14:36:43 +0000
(16:36 +0200)
committer
Jérôme Benoit
<jerome.benoit@sap.com>
Tue, 15 Aug 2023 14:36:43 +0000
(16:36 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/pools/abstract-pool.ts
patch
|
blob
|
blame
|
history
diff --git
a/src/pools/abstract-pool.ts
b/src/pools/abstract-pool.ts
index 4c08671e5d99ab362f4b0263a423cfe42b4af5e5..d36e8a4737dbe5514aa936de561780baee5ba528 100644
(file)
--- a/
src/pools/abstract-pool.ts
+++ b/
src/pools/abstract-pool.ts
@@
-672,7
+672,11
@@
export abstract class AbstractPool<
) {
reject(new TypeError('name argument must not be an empty string'))
}
- if (name != null && !this.taskFunctions.includes(name)) {
+ if (
+ name != null &&
+ this.taskFunctions != null &&
+ !this.taskFunctions.includes(name)
+ ) {
reject(
new Error(`Task function '${name}' is not registered in the pool`)
)