Skip to content

Commit 81fcc37

Browse files
committed
fix: added validation for empty clientSecret in completeUpdateIntent
1 parent da1505c commit 81fcc37

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/hyper-loader/Hyper.res

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,11 @@ let make = (keys, options: option<JSON.t>, analyticsInfo: option<JSON.t>) => {
729729
}
730730

731731
let completeUpdateIntent = clientSecret => {
732-
sessionUpdate(clientSecret)
732+
if clientSecret != "" {
733+
sessionUpdate(clientSecret)
734+
} else {
735+
Promise.resolve(Dict.make()->JSON.Encode.object)
736+
}
733737
}
734738

735739
let initiateUpdateIntent = () => {

0 commit comments

Comments
 (0)