Przeglądaj źródła

bootstrap returns single seep if that's the only one

Evan You 13 lat temu
rodzic
commit
f5995a5641
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      src/main.js

+ 1 - 1
src/main.js

@@ -71,7 +71,7 @@ api.bootstrap = function (opts) {
     while (el = document.querySelector(ctrlSlt) || document.querySelector(dataSlt)) {
         seeds.push(new Seed(el))
     }
-    return seeds
+    return seeds.length > 1 ? seeds : seeds[0]
 }
 
 module.exports = api