bt-core-app 1.2.1 → 1.2.2

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.
@@ -18056,7 +18056,7 @@ function Xk(e) {
18056
18056
  }
18057
18057
  function _() {
18058
18058
  var y;
18059
- (y = a.value).timeZone ?? (y.timeZone = e.defaultTimeZone ?? Ks);
18059
+ a.value ?? (a.value = {}), (y = a.value).timeZone ?? (y.timeZone = e.defaultTimeZone ?? Ks);
18060
18060
  }
18061
18061
  function A() {
18062
18062
  return a.value.timeZone ?? e.defaultTimeZone ?? Ks;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bt-core-app",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "Core app tools for some basic features like navigation, authentication, server apis, and cosmetics",
5
5
  "homepage": "https://github.com/BlitzItTech/bt-core",
6
6
  "bugs": {
@@ -324,6 +324,7 @@ export function createAuth(options: CreateAuthOptions): BTAuth {
324
324
  }
325
325
 
326
326
  function reinstateDefaults() {
327
+ state.value ??= {}
327
328
  state.value.timeZone ??= (options.defaultTimeZone ?? defaultTimeZone)
328
329
  }
329
330
 
package/test/auth.test.ts CHANGED
@@ -60,4 +60,9 @@ describe('default auth', () => {
60
60
 
61
61
  expect(a.authState).toEqual(auth.authState)
62
62
  })
63
+
64
+
65
+ test('login', () => {
66
+ auth.login()
67
+ })
63
68
  })