Use same singleton impl as MatrixClientPeg for SessionStore
This commit is contained in:
parent
5c8187dc8f
commit
6ffe7ef9b2
1 changed files with 3 additions and 5 deletions
|
@ -55,9 +55,7 @@ SessionStore.prototype.getCachedPassword = function() {
|
||||||
|
|
||||||
// Export singleton getter
|
// Export singleton getter
|
||||||
let singletonSessionStore = null;
|
let singletonSessionStore = null;
|
||||||
export default function getSessionStore() {
|
if (!singletonSessionStore) {
|
||||||
if (!singletonSessionStore) {
|
singletonSessionStore = new SessionStore();
|
||||||
singletonSessionStore = new SessionStore();
|
|
||||||
}
|
|
||||||
return singletonSessionStore;
|
|
||||||
}
|
}
|
||||||
|
module.exports = singletonSessionStore;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue