tweak
This commit is contained in:
parent
5d09ad30d7
commit
ff89ec62fd
4 changed files with 112 additions and 75 deletions
1
utils.js
1
utils.js
|
|
@ -77,6 +77,7 @@ function dominantComposition(composition) {
|
|||
let bestId = null;
|
||||
let bestCount = 0;
|
||||
for (const [id, count] of composition) {
|
||||
if (!Number.isFinite(count) || count <= 0) continue;
|
||||
if (count > bestCount) {
|
||||
bestId = id;
|
||||
bestCount = count;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue