fix array empty test

Have to check for array length here, because Boolean([]) is always `true`.
pull/36/head
Schlaefer 2018-07-01 12:36:22 +02:00 committed by Schlaefer
parent d483866ffc
commit a554d67b39
1 changed files with 1 additions and 1 deletions

View File

@ -379,7 +379,7 @@
for(var i=0; i<targets.length; i++) {
targetsSel.push(targets[i].dataset.target);
}
if(targetsSel) {
if(targetsSel.length > 0) {
areas = document.querySelectorAll(targetsSel.join(','));
}
}