Skip to content

Commit

Permalink
Reformat code and error by wrong selector
Browse files Browse the repository at this point in the history
  • Loading branch information
jschwind committed May 27, 2024
1 parent 16d6c35 commit fc4ce30
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dist/js/avalynx-ref.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ export class AvalynxRef {
selector = '.' + selector;
}
this.elements = document.querySelectorAll(selector);
if (this.elements.length === 0) {
console.error("AvalynxRef: Ref(s) with selector '" + selector + "' not found");
return;
}
this.options = {
isHtml: false,
...options
Expand Down
4 changes: 4 additions & 0 deletions dist/js/avalynx-ref.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ class AvalynxRef {
selector = '.' + selector;
}
this.elements = document.querySelectorAll(selector);
if (this.elements.length === 0) {
console.error("AvalynxRef: Ref(s) with selector '" + selector + "' not found");
return;
}
this.options = {
isHtml: false,
...options
Expand Down
4 changes: 4 additions & 0 deletions src/js/avalynx-ref.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ export class AvalynxRef {
selector = '.' + selector;
}
this.elements = document.querySelectorAll(selector);
if (this.elements.length === 0) {
console.error("AvalynxRef: Ref(s) with selector '" + selector + "' not found");
return;
}
this.options = {
isHtml: false,
...options
Expand Down
4 changes: 4 additions & 0 deletions src/js/avalynx-ref.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ class AvalynxRef {
selector = '.' + selector;
}
this.elements = document.querySelectorAll(selector);
if (this.elements.length === 0) {
console.error("AvalynxRef: Ref(s) with selector '" + selector + "' not found");
return;
}
this.options = {
isHtml: false,
...options
Expand Down

0 comments on commit fc4ce30

Please sign in to comment.