Skip to content
Snippets Groups Projects
Commit 1f6ec183 authored by Mike Greiling's avatar Mike Greiling
Browse files

remove selector string option from Subscription constructor

parent eed2de20
Branches
Tags
1 merge request!7389Remove the help text under the sidebar subscribe button and style it inline
Pipeline #
Loading
@@ -2,12 +2,10 @@
Loading
@@ -2,12 +2,10 @@
   
(() => { (() => {
class Subscription { class Subscription {
constructor(containerSelector) { constructor(containerElm) {
this.containerElm = (typeof containerSelector === 'string') this.containerElm = containerElm;
? document.querySelector(containerSelector)
: containerSelector;
   
const subscribeButton = this.containerElm.querySelector('.js-subscribe-button'); const subscribeButton = containerElm.querySelector('.js-subscribe-button');
if (subscribeButton) { if (subscribeButton) {
// remove class so we don't bind twice // remove class so we don't bind twice
subscribeButton.classList.remove('js-subscribe-button'); subscribeButton.classList.remove('js-subscribe-button');
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment