check if there is not profile, to redir

This commit is contained in:
Matias Alejo Garcia 2014-10-11 08:43:51 -03:00
commit b03a3f1391
9 changed files with 52 additions and 28 deletions

View file

@ -18,12 +18,14 @@ var id = 0;
*/
function Storage(opts) {
preconditions.checkArgument(opts);
preconditions.checkArgument(opts.password);
preconditions.checkArgument(!opts.passphrase);
this.wListCache = {};
this.__uniqueid = ++id;
this.passphraseConfig = opts.passphrase;
this.setPassword(opts.password);
this.passphraseConfig = opts.passphraseConfig;
if (opts.password)
this.setPassword(opts.password);
try {
this.db = opts.db || localStorage;