Add .length to !$el, replace break; with return false;
authorVlad Chernushevich <mailbox@happytodesign.com>
Sun, 16 Jun 2013 18:03:36 +0000 (20:03 +0200)
committerVlad Chernushevich <mailbox@happytodesign.com>
Sun, 16 Jun 2013 18:03:36 +0000 (20:03 +0200)
client/assets/src/applets/settings.js

index e8c35dd2669d7b5932898cd89f087d7a112145c3..cc53ad6a1f24c2cf6b50803b38f1d16d1e971f52 100644 (file)
 \r
             $.each(_kiwi.global.settings.attributes, function(key, value) {\r
 \r
+                console.log(key, value);\r
+\r
                 var $el = $('[data-setting="' + key + '"]', that.$el);\r
 \r
                 // Only deal with settings we have a UI element for\r
-                if (!$el)\r
-                    return;\r
+                if (!$el.length)\r
+                    return false;\r
 \r
                 switch ($el.prop('type')) {\r
                     case 'checkbox':\r