Skip to content

Commit

Permalink
fix(link-preview): Correct synchronization of preview data on change. (
Browse files Browse the repository at this point in the history
…#26641) (#26654)

- 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>
(cherry picked from commit 35a02b8)

Co-authored-by: Anes Fassih <36681054+anesfassih@users.noreply.github.com>
  • Loading branch information
mergify[bot] and anesfassih committed Jun 3, 2024
1 parent 719522d commit c34c1d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frappe/public/js/frappe/ui/link_preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit c34c1d1

Please sign in to comment.