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
No related branches found
No related tags found
1 merge request!7389Remove the help text under the sidebar subscribe button and style it inline
Pipeline #
Loading
Loading
@@ -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');
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment