From fb9d5af5fc16fac2f8613d5fbfafe27d8720688e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lorenz=20H=C3=BCbschle-Schneider?= Date: Fri, 21 Feb 2014 10:50:29 +0000 Subject: [PATCH] localstorage: Correctly check whether value is set before setting default The old condition always overwrote boolean values that were set to false with the default m( Check for undefined instead. --- js/localstorage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/localstorage.js b/js/localstorage.js index 971ac1d..cfcf1ce 100644 --- a/js/localstorage.js +++ b/js/localstorage.js @@ -98,7 +98,7 @@ ls.factory("$store",function($parse){ */ bind: function ($scope, key, def) { def = def || ''; - if (!publicMethods.get(key)) { + if (publicMethods.get(key) === undefined) { publicMethods.set(key, def); } $parse(key).assign($scope, publicMethods.get(key));