Skip to content

Commit

Permalink
refactor: use dynamic value for selector
Browse files Browse the repository at this point in the history
  • Loading branch information
NiclasNorin committed Feb 28, 2025
1 parent ca615e6 commit c321c7b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class OptionCreateLayerGroup implements OptionFeature {
}

private addListener() {
this.container.querySelector('[data-js-value="create_layer_group"]')?.addEventListener('click', (e) => {
this.container.querySelector(`[data-js-value="${this.condition}"]`)?.addEventListener('click', (e) => {
e.preventDefault();

const layerGroupDataInstance = this.layerGroupFactoryInstance.create();
Expand Down

0 comments on commit c321c7b

Please sign in to comment.