Commit 5b03f4fd authored by Tristan Cavelier's avatar Tristan Cavelier

fix jioNamespace bug, constructor called with a wrong var

parent 01a2df51
...@@ -29,11 +29,13 @@ var jioNamespace = (function (spec) { ...@@ -29,11 +29,13 @@ var jioNamespace = (function (spec) {
instance = null; instance = null;
if (typeof storage === 'string') { if (typeof storage === 'string') {
storage = JSON.parse(storage); storage = JSON.parse(storage);
} else {
storage = JSON.parse(JSON.stringify(storage));
} }
storage = storage || { storage = storage || {
type: 'base' type: 'base'
}; };
instance = jio(spec); instance = jio(storage);
instance.start(); instance.start();
return instance; return instance;
} }
......
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