Commit da79424c authored by Tristan Cavelier's avatar Tristan Cavelier Committed by Sebastien Robin

Array browsing other bugs fixed.

parent a969eb49
...@@ -258,10 +258,7 @@ var JIO = ...@@ -258,10 +258,7 @@ var JIO =
// options.jioID : the jio ID // options.jioID : the jio ID
var k, emptyfun = function (){}, var k, emptyfun = function (){},
jioIdArray = jioGlobalObj.localStorage.getItem (jioIdArrayName); jioIdArray = jioGlobalObj.localStorage.getItem (jioIdArrayName)||[];
if (jioIdArray === null) {
jioIdArray = [];
}
if (options.publisher) { if (options.publisher) {
priv.publisher = publisher; priv.publisher = publisher;
} }
...@@ -289,7 +286,7 @@ var JIO = ...@@ -289,7 +286,7 @@ var JIO =
// Returns a new queueID // Returns a new queueID
var k = null, id = 0, var k = null, id = 0,
jioIdArray = jioGlobalObj.localStorage.getItem (jioIdArrayName); jioIdArray = jioGlobalObj.localStorage.getItem (jioIdArrayName)||[];
for (k = 0; k < jioIdArray.length; k += 1) { for (k = 0; k < jioIdArray.length; k += 1) {
if (jioIdArray[k] >= jioGlobalObj.queueID) { if (jioIdArray[k] >= jioGlobalObj.queueID) {
jioGlobalObj.queueID = jioIdArray[k] + 1; jioGlobalObj.queueID = jioIdArray[k] + 1;
...@@ -303,7 +300,7 @@ var JIO = ...@@ -303,7 +300,7 @@ var JIO =
// recover job object from older inactive jio // recover job object from older inactive jio
var k = null, newJioIdArray = [], jioIdArrayChanged = false, var k = null, newJioIdArray = [], jioIdArrayChanged = false,
jioIdArray = jioGlobalObj.localStorage.getItem (jioIdArrayName); jioIdArray = jioGlobalObj.localStorage.getItem (jioIdArrayName)||[];
for (k = 0; k < jioIdArray.length; k += 1) { for (k = 0; k < jioIdArray.length; k += 1) {
if (jioGlobalObj.localStorage.getItem ( if (jioGlobalObj.localStorage.getItem (
'jio/id/'+jioIdArray[k]) < Date.now () - 10000) { 'jio/id/'+jioIdArray[k]) < Date.now () - 10000) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment