diff --git a/assets/javascripts/discourse/controllers/discourse-post-event-invitees.js.es6 b/assets/javascripts/discourse/controllers/discourse-post-event-invitees.js.es6 index 751e5932..bbc81c65 100644 --- a/assets/javascripts/discourse/controllers/discourse-post-event-invitees.js.es6 +++ b/assets/javascripts/discourse/controllers/discourse-post-event-invitees.js.es6 @@ -1,7 +1,8 @@ import ModalFunctionality from "discourse/mixins/modal-functionality"; import Controller from "@ember/controller"; -import { debounce } from "@ember/runloop"; import { action } from "@ember/object"; +import discourseDebounce from "discourse-common/lib/debounce"; +import { debounce } from "@ember/runloop"; export default Controller.extend(ModalFunctionality, { invitees: null, @@ -14,7 +15,10 @@ export default Controller.extend(ModalFunctionality, { @action onFilterChanged(filter) { - debounce(this, this._fetchInvitees, filter, 250); + // TODO: Use discouseDebounce after the 2.7 release. + const debounceFunc = discourseDebounce || debounce; + + debounceFunc(this, this._fetchInvitees, filter, 250); }, @action