@etsoo/shared 1.0.89 → 1.0.90

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.
@@ -21,13 +21,7 @@ class WindowStorage {
21
21
  this.instanceCountField = 'EtsooSmartERPInstanceCount';
22
22
  // Init instance index
23
23
  this._instanceIndex = this.getInstanceCount();
24
- if (globalFields.length == 0)
25
- return;
26
- // Copy global fields to session storage where first item does not exist
27
- // Duplicate browser tab would copy the session storage
28
- const firsItem = sessionStorage.getItem(globalFields[0]);
29
- if (firsItem)
30
- return;
24
+ // Copy global fields to session storage
31
25
  globalFields.forEach((field) => {
32
26
  const data = callback(field, localStorage.getItem(field), this._instanceIndex);
33
27
  if (data == null)
@@ -18,13 +18,7 @@ export class WindowStorage {
18
18
  this.instanceCountField = 'EtsooSmartERPInstanceCount';
19
19
  // Init instance index
20
20
  this._instanceIndex = this.getInstanceCount();
21
- if (globalFields.length == 0)
22
- return;
23
- // Copy global fields to session storage where first item does not exist
24
- // Duplicate browser tab would copy the session storage
25
- const firsItem = sessionStorage.getItem(globalFields[0]);
26
- if (firsItem)
27
- return;
21
+ // Copy global fields to session storage
28
22
  globalFields.forEach((field) => {
29
23
  const data = callback(field, localStorage.getItem(field), this._instanceIndex);
30
24
  if (data == null)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/shared",
3
- "version": "1.0.89",
3
+ "version": "1.0.90",
4
4
  "description": "TypeScript shared utilities and functions",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/mjs/index.js",
@@ -32,13 +32,7 @@ export class WindowStorage implements IStorage {
32
32
  // Init instance index
33
33
  this._instanceIndex = this.getInstanceCount();
34
34
 
35
- if (globalFields.length == 0) return;
36
-
37
- // Copy global fields to session storage where first item does not exist
38
- // Duplicate browser tab would copy the session storage
39
- const firsItem = sessionStorage.getItem(globalFields[0]);
40
- if (firsItem) return;
41
-
35
+ // Copy global fields to session storage
42
36
  globalFields.forEach((field) => {
43
37
  const data = callback(
44
38
  field,