DEV: fixes deprecation due to incorrect appEvent setup on share:url (#8122)

DEV: fixes deprecation due to incorrect appEvent setup on share:url (#8122)

diff --git a/app/assets/javascripts/discourse/components/share-popup.js.es6 b/app/assets/javascripts/discourse/components/share-popup.js.es6
index a396b61..dad5d68 100644
--- a/app/assets/javascripts/discourse/components/share-popup.js.es6
+++ b/app/assets/javascripts/discourse/components/share-popup.js.es6
@@ -170,7 +170,7 @@ export default Ember.Component.extend({
       )
       .on("keydown.share-view", this._boundKeydownHandler);
 
-    this.appEvents.on("share:url", this._shareUrlHandler);
+    this.appEvents.on("share:url", this, "_shareUrlHandler");
   },
 
   willDestroyElement() {
@@ -181,7 +181,7 @@ export default Ember.Component.extend({
       .off("mousedown.outside-share-link", this._boundMouseDownHandler)
       .off("keydown.share-view", this._boundKeydownHandler);
 
-    this.appEvents.off("share:url", this._shareUrlHandler);
+    this.appEvents.off("share:url", this, "_shareUrlHandler");
   },
 
   actions: {

GitHub sha: a5af98a1

1 Like