Skip to content

Commit 9630e2a

Browse files
refactor(core): use idiomatic Option.isSome check for legacy success callback decoding
1 parent a04cfe0 commit 9630e2a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/core/src/integration.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export * as Integration from "./integration"
22

3-
import { Cause, Clock, Context, Duration, Effect, Exit, Layer, Schedule, Schema, Scope, SynchronizedRef } from "effect"
3+
import { Cause, Clock, Context, Duration, Effect, Exit, Layer, Option, Schedule, Schema, Scope, SynchronizedRef } from "effect"
44
import { castDraft, enableMapSet, type Draft } from "immer"
55
import { Credential } from "./credential"
66
import { IntegrationSchema } from "./integration/schema"
@@ -379,7 +379,7 @@ export const locationLayer = Layer.effect(
379379
if (Exit.isSuccess(exit)) {
380380
let value = exit.value
381381
const decodedOption = decodeLegacySuccess(value)
382-
if (decodedOption._tag === "Some") {
382+
if (Option.isSome(decodedOption)) {
383383
const legacy = decodedOption.value
384384
if ("access" in legacy) {
385385
value = new Credential.OAuth({

0 commit comments

Comments
 (0)