fix: controls loading for discussions (#22037)

This commit is contained in:
Jannat Patel 2023-08-14 10:21:09 +05:30 committed by GitHub
parent a3c7358f66
commit cd2f2df303
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View file

@ -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";

View file

@ -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);