fix(link-preview): Correct synchronization of preview data on change. (#26641)

- Use 'config' attribute instead deprecated 'options' which is always undefined and prevent updating the preview data.

Co-authored-by: Anes Fassih <anes.fassih@nassej.com>
This commit is contained in:
Anes Fassih 2024-06-03 10:38:34 +01:00 committed by GitHub
parent b1193675dd
commit 35a02b8d0a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -74,9 +74,9 @@ frappe.ui.LinkPreview = class {
}
this.popover_timeout = setTimeout(() => {
if (this.popover && this.popover.options) {
if (this.popover && this.popover.config) {
let new_content = this.get_popover_html(preview_data);
this.popover.options.content = new_content;
this.popover.config.content = new_content;
} else {
this.init_preview_popover(preview_data);
}