Skip to content
Snippets Groups Projects
Commit 962eb558 authored by Lloyd Hilaiel's avatar Lloyd Hilaiel
Browse files

fix errors emitted to console during tests. closes #1547

parent f08f36cd
No related branches found
No related tags found
No related merge requests found
......@@ -407,7 +407,7 @@ BrowserID.Storage = (function() {
function currentInteractionData() {
try {
return JSON.parse(storage.interactionData)[0];
return storage.interactionData ? JSON.parse(storage.interactionData)[0] : {};
} catch(e) {
if (window.console && console.error) console.error(e);
return {};
......@@ -428,7 +428,7 @@ BrowserID.Storage = (function() {
function getAllInteractionData() {
try {
return JSON.parse(storage.interactionData);
return storage.interactionData ? JSON.parse(storage.interactionData) : [];
} catch(e) {
if (window.console && console.error) console.error(e);
return [];
......@@ -440,7 +440,7 @@ BrowserID.Storage = (function() {
storage.interactionData = JSON.stringify([]);
} catch(e) {
delete storage.interactionData;
if (window.console && console.error) console.error(e);
if (window.console && console.error) console.error(e);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment