Skip to content

Commit b916e21

Browse files
wa0x6eChaituVR
andauthored
fix: fix operator precedence (#1176)
* fix: fix operator precedence * v0.14.8 --------- Co-authored-by: Chaitanya <[email protected]>
1 parent 0f561de commit b916e21

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@snapshot-labs/snapshot.js",
3-
"version": "0.14.7",
3+
"version": "0.14.8",
44
"repository": "snapshot-labs/snapshot.js",
55
"license": "MIT",
66
"main": "dist/snapshot.cjs.js",

src/voting/rankedChoice.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ export default class RankedChoiceVoting {
143143
this.strategies.map((strategy, sI) => {
144144
return finalRound
145145
.filter((res) => Number(res[0]) === i + 1)
146-
.reduce((a, b) => a + b[1][1][sI] || 0, 0);
146+
.reduce((a, b) => a + (b[1][1][sI] || 0), 0);
147147
})
148148
);
149149
}

0 commit comments

Comments
 (0)