From 782c74a8deb734f274d3b58275bcb1aaa65164db Mon Sep 17 00:00:00 2001 From: Ben Pickles Date: Mon, 23 Aug 2010 20:07:35 +0100 Subject: [PATCH] Who'd have thought IE8 would have localStorage and yet not support Array#indexOf! --- src/model_local_storage.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/model_local_storage.js b/src/model_local_storage.js index 2e4ccd4..8f89d82 100644 --- a/src/model_local_storage.js +++ b/src/model_local_storage.js @@ -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)