remove selector string option from Subscription constructor
This commit is contained in:
parent
eed2de2058
commit
1f6ec18315
1 changed files with 3 additions and 5 deletions
|
@ -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…
Reference in a new issue