Skip to content

Commit

Permalink
Who'd have thought IE8 would have localStorage and yet not support Ar…
Browse files Browse the repository at this point in the history
…ray#indexOf!
  • Loading branch information
benpickles committed Aug 23, 2010
1 parent 89f1bbf commit 782c74a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/model_local_storage.js
Expand Up @@ -30,14 +30,14 @@ Model.LocalStorage = function(klass) {
var addToIndex = function(uid) {
var uids = readIndex()

if (uids.indexOf(uid) === -1) {
if (jQuery.inArray(uid, uids) === -1) {
uids.push(uid)
writeIndex(uids)
}
}
var removeFromIndex = function(uid) {
var uids = readIndex()
var index = uids.indexOf(uid)
var index = jQuery.inArray(uid, uids)

if (index > -1) {
uids.splice(index, 1)
Expand Down

0 comments on commit 782c74a

Please sign in to comment.