From 2484ef93ed77607c11ec8fc178be6a8bdd5dcf6f Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Thu, 16 Jun 2016 18:05:15 +0800 Subject: [PATCH] Use ES6 arrow functions instead. --- app/assets/javascripts/discourse/controllers/composer.js.es6 | 2 +- app/assets/javascripts/discourse/lib/plugin-api.js.es6 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/discourse/controllers/composer.js.es6 b/app/assets/javascripts/discourse/controllers/composer.js.es6 index bac746b3b..a52120b22 100644 --- a/app/assets/javascripts/discourse/controllers/composer.js.es6 +++ b/app/assets/javascripts/discourse/controllers/composer.js.es6 @@ -65,7 +65,7 @@ export default Ember.Controller.extend({ init() { this._super(); - addPopupMenuOptionsCallback(function() { + addPopupMenuOptionsCallback(() => { return { action: 'toggleWhisper', icon: 'eye-slash', diff --git a/app/assets/javascripts/discourse/lib/plugin-api.js.es6 b/app/assets/javascripts/discourse/lib/plugin-api.js.es6 index c97573fb4..1ccc1c067 100644 --- a/app/assets/javascripts/discourse/lib/plugin-api.js.es6 +++ b/app/assets/javascripts/discourse/lib/plugin-api.js.es6 @@ -231,7 +231,7 @@ class PluginApi { * Example: * * ``` - * api.addToolbarPopupMenuOptionsCallback(function() { + * api.addToolbarPopupMenuOptionsCallback(() => { * return { * action: 'toggleWhisper', * icon: 'eye-slash',