Make sure we never create the file store object twice

This commit is contained in:
yflory 2017-01-06 14:14:13 +01:00
parent 1e70af0c16
commit 6106f7d6ca

View File

@ -133,8 +133,11 @@ define([
} }
}; };
var initialized = false;
var init = function (f, Cryptpad) { var init = function (f, Cryptpad) {
if (!Cryptpad) { return; } if (!Cryptpad || initialized) { return; }
initialized = true;
var hash = Cryptpad.getUserHash() || localStorage.FS_hash; var hash = Cryptpad.getUserHash() || localStorage.FS_hash;
var secret = Cryptpad.getSecrets(hash); var secret = Cryptpad.getSecrets(hash);
var listmapConfig = { var listmapConfig = {