Avoid duplicate inline embeds (#13048)

This commit is contained in:
Hariom Balhara 2024-01-05 18:02:53 +05:30 committed by GitHub
parent b99ccb1a5a
commit 6ce6d570db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -439,6 +439,10 @@ class CalApi {
elementOrSelector: string | HTMLElement;
config?: PrefillAndIframeAttrsConfig;
}) {
if (this.cal.inlineEl) {
console.warn("Inline embed already exists. Ignoring this call");
return;
}
// eslint-disable-next-line prefer-rest-params
validate(arguments[0], {
required: true,