diff --git a/package.json b/package.json index 5032ecf..f08ed12 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "modujs", - "version": "1.1.5", + "version": "1.2.0", "description": "Dead simple modular JavaScript framework for ES modules.", "repository": "modularorg/modularjs", "author": "Antoine Boulanger (https://antoineboulanger.com)", diff --git a/src/module.js b/src/module.js index b22579a..6dcf3a5 100644 --- a/src/module.js +++ b/src/module.js @@ -81,13 +81,7 @@ export default class { parent = context; } - const els = parent.querySelectorAll('[' + this.mAttr + '=' + name + ']' + more); - - if (els.length == 1) { - return els[0]; - } else { - return els; - } + return parent.querySelectorAll('[' + this.mAttr + '=' + name + ']' + more); } parent(query, context) {