Skip to content
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.

Commit

Permalink
fix(client): Replace calls to [].indexOf with _.indexOf for IE8 support.
Browse files Browse the repository at this point in the history
fixes #1263
  • Loading branch information
Shane Tomlinson committed Jun 18, 2014
1 parent a13a8eb commit b5430e1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/scripts/lib/session.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ define([
var toSaveToSessionStorage = {};
var toSaveToLocalStorage = {};
_.each(this, function (value, key) {
if (DO_NOT_PERSIST.indexOf(key) === -1) {
if (PERSIST_TO_LOCAL_STORAGE.indexOf(key) >= 0) {
if (_.indexOf(DO_NOT_PERSIST, key) === -1) {
if (_.indexOf(PERSIST_TO_LOCAL_STORAGE, key) >= 0) {
toSaveToLocalStorage[key] = value;
} else {
toSaveToSessionStorage[key] = value;
Expand Down Expand Up @@ -132,7 +132,7 @@ define([
return;
}

if (this.hasOwnProperty(key) && DO_NOT_CLEAR.indexOf(key) === -1) {
if (this.hasOwnProperty(key) && _.indexOf(DO_NOT_CLEAR, key) === -1) {
this[key] = null;
delete this[key];
this.persist();
Expand Down

0 comments on commit b5430e1

Please sign in to comment.