repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
test: less strict expectation
[poolifier.git]
/
src
/
utils.ts
diff --git
a/src/utils.ts
b/src/utils.ts
index 20493767db87d80689a6cb067df3e22f72b759ce..8e84e9474c8a91d1adceb740e5c5ff21292faa02 100644
(file)
--- a/
src/utils.ts
+++ b/
src/utils.ts
@@
-291,12
+291,12
@@
export const buildInternalWorkerChoiceStrategyOptions = (
opts?: InternalWorkerChoiceStrategyOptions
): InternalWorkerChoiceStrategyOptions => {
opts = clone(opts ?? {})
opts?: InternalWorkerChoiceStrategyOptions
): InternalWorkerChoiceStrategyOptions => {
opts = clone(opts ?? {})
- if (opts.weights == null) {
+ if (opts
?
.weights == null) {
opts.weights = getDefaultWeights(poolMaxSize)
}
return {
...getDefaultInternalWorkerChoiceStrategyOptions(
opts.weights = getDefaultWeights(poolMaxSize)
}
return {
...getDefaultInternalWorkerChoiceStrategyOptions(
- poolMaxSize + Object.keys(opts
?.weights ?? {}
).length
+ poolMaxSize + Object.keys(opts
.weights
).length
),
...opts
}
),
...opts
}