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.
This commit is contained in:
parent
df1bb08749
commit
fb9d5af5fc
1 changed files with 1 additions and 1 deletions
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue