File tree 4 files changed +16
-0
lines changed
4 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,10 @@ export class AvalynxRef {
24
24
selector = '.' + selector ;
25
25
}
26
26
this . elements = document . querySelectorAll ( selector ) ;
27
+ if ( this . elements . length === 0 ) {
28
+ console . error ( "AvalynxRef: Ref(s) with selector '" + selector + "' not found" ) ;
29
+ return ;
30
+ }
27
31
this . options = {
28
32
isHtml : false ,
29
33
...options
Original file line number Diff line number Diff line change @@ -23,6 +23,10 @@ class AvalynxRef {
23
23
selector = '.' + selector ;
24
24
}
25
25
this . elements = document . querySelectorAll ( selector ) ;
26
+ if ( this . elements . length === 0 ) {
27
+ console . error ( "AvalynxRef: Ref(s) with selector '" + selector + "' not found" ) ;
28
+ return ;
29
+ }
26
30
this . options = {
27
31
isHtml : false ,
28
32
...options
Original file line number Diff line number Diff line change @@ -24,6 +24,10 @@ export class AvalynxRef {
24
24
selector = '.' + selector ;
25
25
}
26
26
this . elements = document . querySelectorAll ( selector ) ;
27
+ if ( this . elements . length === 0 ) {
28
+ console . error ( "AvalynxRef: Ref(s) with selector '" + selector + "' not found" ) ;
29
+ return ;
30
+ }
27
31
this . options = {
28
32
isHtml : false ,
29
33
...options
Original file line number Diff line number Diff line change @@ -23,6 +23,10 @@ class AvalynxRef {
23
23
selector = '.' + selector ;
24
24
}
25
25
this . elements = document . querySelectorAll ( selector ) ;
26
+ if ( this . elements . length === 0 ) {
27
+ console . error ( "AvalynxRef: Ref(s) with selector '" + selector + "' not found" ) ;
28
+ return ;
29
+ }
26
30
this . options = {
27
31
isHtml : false ,
28
32
...options
You can’t perform that action at this time.
0 commit comments