From 76380687adf0169f1af03625192ae05612ee6b89 Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Mon, 21 Jan 2019 15:17:06 +0530 Subject: [PATCH] fix: Make event emitter from blank object MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - If a function is passed to jQuery, it calls it 🤷🏻‍♂️ - In hindsight, it is not needed to pass the object to jQuery - This fixes a weird bug explained here https://github.com/frappe/frappe/pull/6791 --- frappe/public/js/frappe/event_emitter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/public/js/frappe/event_emitter.js b/frappe/public/js/frappe/event_emitter.js index aeed656e4e..d0938b9b4a 100644 --- a/frappe/public/js/frappe/event_emitter.js +++ b/frappe/public/js/frappe/event_emitter.js @@ -4,7 +4,7 @@ frappe.provide('frappe.utils'); */ const EventEmitterMixin = { init() { - this.jq = jQuery(this); + this.jq = jQuery({}); }, trigger(evt, data) {