🐛 (calCom) Fix book callback not working on second attempt
This commit is contained in:
@ -49,14 +49,20 @@ export const bookEvent = createAction({
|
||||
parseFunction: () => {
|
||||
return {
|
||||
args: {},
|
||||
content: `Cal("on", {
|
||||
action: "bookingSuccessful",
|
||||
callback: (e) => {
|
||||
if(window.calComBooked) return
|
||||
content: `{
|
||||
const callback = (e) => {
|
||||
continueFlow(e.detail.data.date)
|
||||
window.calComBooked = true
|
||||
Cal("off", {
|
||||
action: "bookingSuccessful",
|
||||
callback
|
||||
})
|
||||
}
|
||||
})`,
|
||||
|
||||
Cal("on", {
|
||||
action: "bookingSuccessful",
|
||||
callback
|
||||
})
|
||||
}`,
|
||||
}
|
||||
},
|
||||
},
|
||||
@ -107,8 +113,6 @@ export const bookEvent = createAction({
|
||||
};
|
||||
})(window, baseUrl + "/embed/embed.js", "init");
|
||||
|
||||
window.calComBooked = false;
|
||||
|
||||
Cal("init", { origin: baseUrl });
|
||||
|
||||
const location = phone ? JSON.stringify({
|
||||
|
Reference in New Issue
Block a user