@etsoo/appscript 1.5.23 → 1.5.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/__tests__/app/CoreApp.ts
CHANGED
package/lib/cjs/app/CoreApp.d.ts
CHANGED
package/lib/cjs/app/CoreApp.js
CHANGED
|
@@ -39,14 +39,8 @@ class CoreApp {
|
|
|
39
39
|
* Device id, randome string from ServiceBase.InitCallAsync
|
|
40
40
|
*/
|
|
41
41
|
get deviceId() {
|
|
42
|
-
if (this._deviceId === '') {
|
|
43
|
-
throw new Error('Device id is empty');
|
|
44
|
-
}
|
|
45
42
|
return this._deviceId;
|
|
46
43
|
}
|
|
47
|
-
set deviceId(value) {
|
|
48
|
-
this._deviceId = value;
|
|
49
|
-
}
|
|
50
44
|
/**
|
|
51
45
|
* Label delegate
|
|
52
46
|
*/
|
|
@@ -233,7 +227,7 @@ class CoreApp {
|
|
|
233
227
|
async restore() {
|
|
234
228
|
// Devices
|
|
235
229
|
const devices = this.storage.getPersistedData(this.fields.devices, []);
|
|
236
|
-
if (this.
|
|
230
|
+
if (this._deviceId === '') {
|
|
237
231
|
// First vist, restore and keep the source
|
|
238
232
|
this.storage.copyFrom(this.persistedFields, false);
|
|
239
233
|
// Reset device id
|
package/lib/mjs/app/CoreApp.d.ts
CHANGED
package/lib/mjs/app/CoreApp.js
CHANGED
|
@@ -36,14 +36,8 @@ export class CoreApp {
|
|
|
36
36
|
* Device id, randome string from ServiceBase.InitCallAsync
|
|
37
37
|
*/
|
|
38
38
|
get deviceId() {
|
|
39
|
-
if (this._deviceId === '') {
|
|
40
|
-
throw new Error('Device id is empty');
|
|
41
|
-
}
|
|
42
39
|
return this._deviceId;
|
|
43
40
|
}
|
|
44
|
-
set deviceId(value) {
|
|
45
|
-
this._deviceId = value;
|
|
46
|
-
}
|
|
47
41
|
/**
|
|
48
42
|
* Label delegate
|
|
49
43
|
*/
|
|
@@ -230,7 +224,7 @@ export class CoreApp {
|
|
|
230
224
|
async restore() {
|
|
231
225
|
// Devices
|
|
232
226
|
const devices = this.storage.getPersistedData(this.fields.devices, []);
|
|
233
|
-
if (this.
|
|
227
|
+
if (this._deviceId === '') {
|
|
234
228
|
// First vist, restore and keep the source
|
|
235
229
|
this.storage.copyFrom(this.persistedFields, false);
|
|
236
230
|
// Reset device id
|
package/package.json
CHANGED
package/src/app/CoreApp.ts
CHANGED
|
@@ -170,14 +170,8 @@ export abstract class CoreApp<
|
|
|
170
170
|
* Device id, randome string from ServiceBase.InitCallAsync
|
|
171
171
|
*/
|
|
172
172
|
get deviceId() {
|
|
173
|
-
if (this._deviceId === '') {
|
|
174
|
-
throw new Error('Device id is empty');
|
|
175
|
-
}
|
|
176
173
|
return this._deviceId;
|
|
177
174
|
}
|
|
178
|
-
protected set deviceId(value: string) {
|
|
179
|
-
this._deviceId = value;
|
|
180
|
-
}
|
|
181
175
|
|
|
182
176
|
/**
|
|
183
177
|
* Label delegate
|
|
@@ -433,7 +427,7 @@ export abstract class CoreApp<
|
|
|
433
427
|
[]
|
|
434
428
|
);
|
|
435
429
|
|
|
436
|
-
if (this.
|
|
430
|
+
if (this._deviceId === '') {
|
|
437
431
|
// First vist, restore and keep the source
|
|
438
432
|
this.storage.copyFrom(this.persistedFields, false);
|
|
439
433
|
|