From 08701d92466ff12a42ecdfab72b93d2bd5c51ce5 Mon Sep 17 00:00:00 2001 From: Vlad Chernushevich Date: Sun, 16 Jun 2013 20:03:36 +0200 Subject: [PATCH] Add .length to !$el, replace break; with return false; --- client/assets/src/applets/settings.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/assets/src/applets/settings.js b/client/assets/src/applets/settings.js index e8c35dd..cc53ad6 100644 --- a/client/assets/src/applets/settings.js +++ b/client/assets/src/applets/settings.js @@ -22,11 +22,13 @@ $.each(_kiwi.global.settings.attributes, function(key, value) { + console.log(key, value); + var $el = $('[data-setting="' + key + '"]', that.$el); // Only deal with settings we have a UI element for - if (!$el) - return; + if (!$el.length) + return false; switch ($el.prop('type')) { case 'checkbox': -- 2.25.1