magmastream 2.10.2-alpha.6 → 2.10.2-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1141,7 +1141,7 @@ class Manager extends events_1.EventEmitter {
|
|
|
1141
1141
|
// Calculate the total weight
|
|
1142
1142
|
const totalWeight = filteredNodes.reduce((total, node) => total + node.options.nodePriority, 0);
|
|
1143
1143
|
// Map the nodes to their weights
|
|
1144
|
-
const weightedNodes = filteredNodes.map((node) => ({
|
|
1144
|
+
const weightedNodes = [...filteredNodes.values()].map((node) => ({
|
|
1145
1145
|
node,
|
|
1146
1146
|
weight: node.options.nodePriority / totalWeight,
|
|
1147
1147
|
}));
|