Closed danilo-valente closed 9 years ago
This way locker.get('notExists', false) will return false instead of undefined.
locker.get('notExists', false)
false
undefined
Before:
locker.get('notExists', 0)
locker.get('notExists', null)
locker.get('notExists', '')
locker.get('notExists', NaN)
Now:
0
null
''
NaN
Yea that makes sense, thanks
I will add some tests to back this up too
This way
locker.get('notExists', false)
will returnfalse
instead ofundefined
.Before:
locker.get('notExists', false)
would returnundefined
locker.get('notExists', 0)
would returnundefined
locker.get('notExists', null)
would returnundefined
locker.get('notExists', '')
would returnundefined
locker.get('notExists', NaN)
would returnundefined
Now:
locker.get('notExists', false)
returnsfalse
locker.get('notExists', 0)
returns0
locker.get('notExists', null)
returnsnull
locker.get('notExists', '')
returns''
locker.get('notExists', NaN)
returnsNaN