Skip to content

Commit 09045f5

Browse files
authored
version 2.16.11 (#1964)
1 parent 530394a commit 09045f5

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@
1616
**Note**: A feature tagged as Experimental is in a
1717
high state of flux, you're at risk of it changing without notice.
1818

19+
# 2.16.11
20+
21+
**Bug Fix**
22+
23+
Fix Option.getOrd definition, #1963
24+
1925
# 2.16.10
2026

2127
**Polish**

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "fp-ts",
3-
"version": "2.16.10",
3+
"version": "2.16.11",
44
"description": "Functional programming in TypeScript",
55
"main": "./lib/index.js",
66
"module": "./es6/index.js",

src/Option.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ export const getEq = <A>(E: Eq<A>): Eq<Option<A>> => ({
297297
*/
298298
export const getOrd = <A>(O: Ord<A>): Ord<Option<A>> => ({
299299
equals: getEq(O).equals,
300-
compare: (x, y) => (isSome(x) ? (isSome(y) ? O.compare(x.value, y.value) : 1) : isSome(y) ? -1 : 0)
300+
compare: (x, y) => (x === y ? 0 : isSome(x) ? (isSome(y) ? O.compare(x.value, y.value) : 1) : isSome(y) ? -1 : 0)
301301
})
302302

303303
/**

0 commit comments

Comments
 (0)