Skip to content

Commit 83fc2ef

Browse files
committed
fix: added validation for empty clientSecret in completeUpdateIntent
1 parent 5febdbd commit 83fc2ef

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/hyper-loader/Hyper.res

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,12 @@ 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([]->getJsonFromArrayOfJson)
736+
}
737+
733738
}
734739

735740
let initiateUpdateIntent = () => {

0 commit comments

Comments
 (0)