Skip to content

Commit 397e859

Browse files
committed
fix: mistake createOk for isOk
1 parent b1d9a2e commit 397e859

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

browser/websocket/push.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import {
1717
createOk,
1818
isErr,
1919
type Result,
20+
isOk,
2021
unwrapErr,
2122
unwrapOk,
2223
} from "option-t/plain_result";
@@ -132,7 +133,7 @@ export const push = async (
132133
// loop for push changes
133134
while (true) {
134135
const result = await emit(socket, "commit", data);
135-
if (createOk(result)) {
136+
if (isOk(result)) {
136137
metadata.commitId = unwrapOk(result).commitId;
137138
// success
138139
return createOk(metadata.commitId);

0 commit comments

Comments
 (0)