diff --git a/frappe/public/js/frappe-web.bundle.js b/frappe/public/js/frappe-web.bundle.js index 30cf552c82..36064767fb 100644 --- a/frappe/public/js/frappe-web.bundle.js +++ b/frappe/public/js/frappe-web.bundle.js @@ -24,4 +24,3 @@ import "./bootstrap-4-web.bundle"; import "../../website/js/website.js"; import "./frappe/socketio_client.js"; -import "./frappe/form/controls/control.js"; diff --git a/frappe/templates/discussions/discussions.js b/frappe/templates/discussions/discussions.js index 4b296fbcce..964de63eb3 100644 --- a/frappe/templates/discussions/discussions.js +++ b/frappe/templates/discussions/discussions.js @@ -3,9 +3,11 @@ frappe.ready(() => { add_color_to_avatars(); this.single_thread = $(".is-single-thread").length; - if (this.single_thread) { - make_comment_editor($(".discussion-form .discussions-comment")); - } + frappe.require("controls.bundle.js", () => { + if (this.single_thread) { + make_comment_editor($(".discussion-form .discussions-comment")); + } + }); $(".search-field").keyup((e) => { search_topic(e);