summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgeoandri <geoandri@gmail.com>2017-03-31 12:32:55 +0300
committerGeorge Andrinopoulos <geoandri@gmail.com>2017-04-11 20:30:28 +0300
commit07442bf84141cf766d05f014385a2ada4d5b6442 (patch)
tree7ad0f683562e12e4bf61a11668383461b2722682
parentb96abc7d26b5d3b888881644b4fe1595bb39e0a1 (diff)
downloadgitlab-ce-07442bf84141cf766d05f014385a2ada4d5b6442.tar.gz
Add wikiEdit to constructor
-rw-r--r--app/assets/javascripts/shortcuts_wiki.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/assets/javascripts/shortcuts_wiki.js b/app/assets/javascripts/shortcuts_wiki.js
index bf4479f29c8..d6d78e70f6d 100644
--- a/app/assets/javascripts/shortcuts_wiki.js
+++ b/app/assets/javascripts/shortcuts_wiki.js
@@ -1,14 +1,14 @@
-/* eslint-disable class-methods-use-this*/
/* global Mousetrap */
/* global ShortcutsNavigation */
export default class ShortcutsWiki extends ShortcutsNavigation {
constructor() {
super();
- Mousetrap.bind('e', this.editWiki);
+ this.$wikiEdit = $('.wiki-edit');
+ Mousetrap.bind('e', this.editWiki.bind(this));
}
editWiki() {
- gl.utils.visitUrl($('.wiki-edit').attr('href'));
+ gl.utils.visitUrl(this.$wikiEdit.attr('href'));
}
}