summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2016-12-01 00:14:12 -0600
committerMike Greiling <mike@pixelcog.com>2016-12-01 00:14:12 -0600
commit1f6ec183154369f8a11d63713970cded0b1474fa (patch)
tree2a55a044f8e1d74dc8fea2409b2763a4d0e1e931
parenteed2de205852afbc4ff56eaaff7e9299f7928317 (diff)
downloadgitlab-ce-1f6ec183154369f8a11d63713970cded0b1474fa.tar.gz
remove selector string option from Subscription constructor24281-issue-merge-request-sidebar-subscribe-button-style-improvement
-rw-r--r--app/assets/javascripts/subscription.js.es68
1 files changed, 3 insertions, 5 deletions
diff --git a/app/assets/javascripts/subscription.js.es6 b/app/assets/javascripts/subscription.js.es6
index 02be594135d..62d1604fe9e 100644
--- a/app/assets/javascripts/subscription.js.es6
+++ b/app/assets/javascripts/subscription.js.es6
@@ -2,12 +2,10 @@
(() => {
class Subscription {
- constructor(containerSelector) {
- this.containerElm = (typeof containerSelector === 'string')
- ? document.querySelector(containerSelector)
- : containerSelector;
+ constructor(containerElm) {
+ this.containerElm = containerElm;
- const subscribeButton = this.containerElm.querySelector('.js-subscribe-button');
+ const subscribeButton = containerElm.querySelector('.js-subscribe-button');
if (subscribeButton) {
// remove class so we don't bind twice
subscribeButton.classList.remove('js-subscribe-button');