Skip to content

Commit

Permalink
Merge branch 'main' into cross-env-functionalities
Browse files Browse the repository at this point in the history
  • Loading branch information
PritishBudhiraja authored Oct 4, 2024
2 parents 6e9139d + 2bdf260 commit d15bd34
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/orca-loader/Hyper.res
Original file line number Diff line number Diff line change
Expand Up @@ -316,11 +316,13 @@ let make = (publishableKey, options: option<JSON.t>, analyticsInfo: option<JSON.
}
postSubmitMessage(dict)

if isSdkButton {
let submitSuccessfulValue = val->JSON.Decode.bool->Option.getOr(false)

if isSdkButton && submitSuccessfulValue {
Window.replaceRootHref(returnUrl)
} else if val->JSON.Decode.bool->Option.getOr(false) && redirect === "always" {
} else if submitSuccessfulValue && redirect === "always" {
Window.replaceRootHref(returnUrl)
} else if !(val->JSON.Decode.bool->Option.getOr(false)) {
} else if !submitSuccessfulValue {
resolve1(json)
} else {
resolve1(data)
Expand Down

0 comments on commit d15bd34

Please sign in to comment.