Преглед изворни кода

bootstrap returns single seep if that's the only one

Evan You пре 12 година
родитељ
комит
f5995a5641
1 измењених фајлова са 1 додато и 1 уклоњено
  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