BigW Consortium Gitlab

Commit 1f6ec183 by Mike Greiling

remove selector string option from Subscription constructor

parent eed2de20
......@@ -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');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment