@microsoft/mgt-element
Advanced tools
Comparing version 2.2.0-next.msal2provider.617820d to 2.2.0-next.msal2provider.94faf9f
@@ -27,14 +27,5 @@ /** | ||
graph: IGraph; | ||
/** | ||
* Enable/Disable multi account functionality | ||
* | ||
* @protected | ||
* @type {boolean} | ||
* @memberof IProvider | ||
*/ | ||
protected isMultipleAccountDisabled: boolean; | ||
private _state; | ||
private _loginChangedDispatcher; | ||
private _activeAccountChangedDispatcher; | ||
get isMultiAccountDisabled(): boolean; | ||
/** | ||
@@ -41,0 +32,0 @@ * returns state of Provider |
@@ -18,10 +18,2 @@ /** | ||
constructor() { | ||
/** | ||
* Enable/Disable multi account functionality | ||
* | ||
* @protected | ||
* @type {boolean} | ||
* @memberof IProvider | ||
*/ | ||
this.isMultipleAccountDisabled = true; | ||
this._loginChangedDispatcher = new EventDispatcher(); | ||
@@ -31,5 +23,2 @@ this._activeAccountChangedDispatcher = new EventDispatcher(); | ||
} | ||
get isMultiAccountDisabled() { | ||
return this.isMultipleAccountDisabled; | ||
} | ||
/** | ||
@@ -36,0 +25,0 @@ * returns state of Provider |
@@ -143,3 +143,8 @@ /** | ||
} | ||
return (yield this.getDb()).get(this.store, key); | ||
try { | ||
return (yield this.getDb()).get(this.store, key); | ||
} | ||
catch (e) { | ||
return null; | ||
} | ||
}); | ||
@@ -160,3 +165,8 @@ } | ||
} | ||
yield (yield this.getDb()).put(this.store, Object.assign(Object.assign({}, item), { timeCached: Date.now() }), key); | ||
try { | ||
yield (yield this.getDb()).put(this.store, Object.assign(Object.assign({}, item), { timeCached: Date.now() }), key); | ||
} | ||
catch (e) { | ||
return; | ||
} | ||
}); | ||
@@ -175,3 +185,8 @@ } | ||
} | ||
(yield this.getDb()).clear(this.store); | ||
try { | ||
(yield this.getDb()).clear(this.store); | ||
} | ||
catch (e) { | ||
return; | ||
} | ||
}); | ||
@@ -178,0 +193,0 @@ } |
@@ -80,6 +80,3 @@ /** | ||
const nextResource = this._nextLink.split(this._version)[1]; | ||
const response = yield this._graph | ||
.api(nextResource) | ||
.version(this._version) | ||
.get(); | ||
const response = yield this._graph.api(nextResource).version(this._version).get(); | ||
if (response && response.value && response.value.length) { | ||
@@ -86,0 +83,0 @@ this._value = this._value.concat(response.value); |
{ | ||
"name": "@microsoft/mgt-element", | ||
"version": "2.2.0-next.msal2provider.617820d", | ||
"version": "2.2.0-next.msal2provider.94faf9f", | ||
"description": "Microsoft Graph Toolkit base classes", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/microsoftgraph/microsoft-graph-toolkit", |
@@ -29,16 +29,5 @@ /** | ||
public graph: IGraph; | ||
/** | ||
* Enable/Disable multi account functionality | ||
* | ||
* @protected | ||
* @type {boolean} | ||
* @memberof IProvider | ||
*/ | ||
protected isMultipleAccountDisabled: boolean = true; | ||
private _state: ProviderState; | ||
private _loginChangedDispatcher = new EventDispatcher<LoginChangedEvent>(); | ||
private _activeAccountChangedDispatcher = new EventDispatcher<ActiveAccountChanged>(); | ||
public get isMultiAccountDisabled(): boolean { | ||
return this.isMultipleAccountDisabled; | ||
} | ||
/** | ||
@@ -45,0 +34,0 @@ * returns state of Provider |
@@ -130,5 +130,3 @@ /** | ||
private static _eventDispatcher: EventDispatcher<ProvidersChangedState> = new EventDispatcher< | ||
ProvidersChangedState | ||
>(); | ||
private static _eventDispatcher: EventDispatcher<ProvidersChangedState> = new EventDispatcher<ProvidersChangedState>(); | ||
@@ -135,0 +133,0 @@ private static _activeAccountChangedDispatcher: EventDispatcher<any> = new EventDispatcher<any>(); |
@@ -285,4 +285,7 @@ /** | ||
} | ||
return (await this.getDb()).get(this.store, key); | ||
try { | ||
return (await this.getDb()).get(this.store, key); | ||
} catch (e) { | ||
return null; | ||
} | ||
} | ||
@@ -302,4 +305,7 @@ | ||
} | ||
await (await this.getDb()).put(this.store, { ...item, timeCached: Date.now() }, key); | ||
try { | ||
await (await this.getDb()).put(this.store, { ...item, timeCached: Date.now() }, key); | ||
} catch (e) { | ||
return; | ||
} | ||
} | ||
@@ -317,4 +323,7 @@ | ||
} | ||
(await this.getDb()).clear(this.store); | ||
try { | ||
(await this.getDb()).clear(this.store); | ||
} catch (e) { | ||
return; | ||
} | ||
} | ||
@@ -321,0 +330,0 @@ |
@@ -81,6 +81,3 @@ /** | ||
const nextResource = this._nextLink.split(this._version)[1]; | ||
const response = await this._graph | ||
.api(nextResource) | ||
.version(this._version) | ||
.get(); | ||
const response = await this._graph.api(nextResource).version(this._version).get(); | ||
if (response && response.value && response.value.length) { | ||
@@ -87,0 +84,0 @@ this._value = this._value.concat(response.value); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1022935
7262