Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Resolves issue where values with integer keys can't be removed #71

Merged
merged 1 commit into from

2 participants

@jordanmaguire

Hi guys,

I'm not sure what testing you guys are looking for here.

This LoC fixes an issue where values with integer keys can't be deleted, as previously if the key wasn't a string it was assumed to be an object. There is similar code in the blackberry file but I'm not sure if that is required to be a string. All I know is this change works for me, locally.

@brianleroux brianleroux merged commit 11577d8 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/adapters/dom.js
View
2  src/adapters/dom.js
@@ -135,7 +135,7 @@ Lawnchair.adapter('dom', (function() {
},
remove: function (keyOrObj, callback) {
- var key = this.name + '.' + (typeof keyOrObj === 'string' ? keyOrObj : keyOrObj.key)
+ var key = this.name + '.' + ((keyOrObj.key) ? keyOrObj.key : keyOrObj)
this.indexer.del(key)
storage.removeItem(key)
if (callback) this.lambda(callback).call(this)
Something went wrong with that request. Please try again.