diff options
author | geoandri <geoandri@gmail.com> | 2017-03-31 12:32:55 +0300 |
---|---|---|
committer | George Andrinopoulos <geoandri@gmail.com> | 2017-04-11 20:30:28 +0300 |
commit | 07442bf84141cf766d05f014385a2ada4d5b6442 (patch) | |
tree | 7ad0f683562e12e4bf61a11668383461b2722682 | |
parent | b96abc7d26b5d3b888881644b4fe1595bb39e0a1 (diff) | |
download | gitlab-ce-07442bf84141cf766d05f014385a2ada4d5b6442.tar.gz |
Add wikiEdit to constructor
-rw-r--r-- | app/assets/javascripts/shortcuts_wiki.js | 6 |
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')); } } |