esoftplay 0.0.127-e → 0.0.127-f

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/global.ts CHANGED
@@ -51,17 +51,18 @@ export default function useGlobalState<T>(initValue: T, o?: useGlobalOption): us
51
51
  let persistKey = o?.persistKey
52
52
  STORAGE.getItem(persistKey).then((p: any) => {
53
53
  if (p) {
54
- if (p != undefined && typeof p == 'string' && (p.startsWith("{") || p.startsWith("[")))
55
- try { set(JSON.parse(p)) } catch (error) { }
56
- else {
57
- if (p == "true" || p == "false") {
58
- try { /* @ts-ignore */ set(eval(p)) } catch (error) { }
59
- } else if (isNaN(p)) {
60
- try { /* @ts-ignore */ set(p) } catch (error) { }
61
- } else {
62
- try { /* @ts-ignore */ set(eval(p)) } catch (error) { }
54
+ if (persistKey != '__globalReady')
55
+ if (p != undefined && typeof p == 'string' && (p.startsWith("{") || p.startsWith("[")))
56
+ try { set(JSON.parse(p)) } catch (error) { }
57
+ else {
58
+ if (p == "true" || p == "false") {
59
+ try { /* @ts-ignore */ set(eval(p)) } catch (error) { }
60
+ } else if (isNaN(p)) {
61
+ try { /* @ts-ignore */ set(p) } catch (error) { }
62
+ } else {
63
+ try { /* @ts-ignore */ set(eval(p)) } catch (error) { }
64
+ }
63
65
  }
64
- }
65
66
  }
66
67
  if (o?.onFinish) {
67
68
  clearTimeout(timeoutFinish)
@@ -15,7 +15,7 @@ export interface LibGlobalProps {
15
15
  children?: any
16
16
  }
17
17
  const globalReady = useGlobalState(false, {
18
- persistKey: "globalReady",
18
+ persistKey: "__globalReady",
19
19
  onFinish: () => {
20
20
  globalReady.set(true)
21
21
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "esoftplay",
3
- "version": "0.0.127-e",
3
+ "version": "0.0.127-f",
4
4
  "description": "embedding data from esoftplay framework (web based) into mobile app",
5
5
  "main": "cache/index.js",
6
6
  "types": "../../index.d.ts",