Bug 1275363 - Fix ext-notifications.js, line 59: TypeError: this is undefined, r?kmag
MozReview-Commit-ID: j6G1dXvoXQ
--- a/toolkit/components/extensions/ext-notifications.js
+++ b/toolkit/components/extensions/ext-notifications.js
@@ -49,20 +49,20 @@ Notification.prototype = {
// This will fail if the OS doesn't support this function.
}
notificationsMap.get(this.extension).delete(this.id);
},
observe(subject, topic, data) {
let notifications = notificationsMap.get(this.extension);
- function emitAndDelete(event) {
+ let emitAndDelete = event => {
notifications.emit(event, data);
notifications.delete(this.id);
- }
+ };
// Don't try to emit events if the extension has been unloaded
if (!notifications) {
return;
}
if (topic === "alertclickcallback") {
emitAndDelete("clicked");