Evan You 12 роки тому
батько
коміт
19b39263fc
2 змінених файлів з 5 додано та 3 видалено
  1. 1 1
      src/directives/index.js
  2. 4 2
      src/main.js

+ 1 - 1
src/directives/index.js

@@ -14,7 +14,7 @@ module.exports = {
     },
 
     hide: function (value) {
-        this.el.style.display = value ? 'none' : ''  
+        this.el.style.display = value ? 'none' : ''
     },
 
     focus: function (value) {

+ 4 - 2
src/main.js

@@ -39,8 +39,10 @@ api.bootstrap = function (opts) {
     if (opts) {
         config.prefix = opts.prefix || config.prefix
     }
-    var app = {}, n = 0, el, seed
-    while (el = document.querySelector('[' + config.prefix + '-controller]')) {
+    var app = {}, n = 0, el, seed,
+        selector = '[' + config.prefix + '-controller]'
+    /* jshint boss: true */
+    while (el = document.querySelector(selector)) {
         seed = new Seed(el)
         if (el.id) {
             app['$' + el.id] = seed