@pisell/pisellos 0.0.20 → 0.0.21

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.
@@ -113,12 +113,12 @@ export var AccountListModule = /*#__PURE__*/function (_BaseModule) {
113
113
  this.core.registerModule(accountModule);
114
114
  accountModule.setAccountInfo(account);
115
115
  this.store.accounts = [].concat(_toConsumableArray(this.store.accounts || []), [accountModule]);
116
- _context2.next = 13;
117
- return this.core.effects.emit(AccountListHooks.OnAccountListUpdate, this.store);
118
- case 13:
119
116
  if (this.store.accounts.length === 1) {
120
117
  this.setActiveAccount(accountModule.getId());
121
118
  }
119
+ _context2.next = 14;
120
+ return this.core.effects.emit(AccountListHooks.OnAccountListUpdate, this.store);
121
+ case 14:
122
122
  _context2.next = 22;
123
123
  break;
124
124
  case 16:
@@ -76,10 +76,10 @@ var AccountListModule = class extends import_BaseModule.BaseModule {
76
76
  this.core.registerModule(accountModule);
77
77
  accountModule.setAccountInfo(account);
78
78
  this.store.accounts = [...this.store.accounts || [], accountModule];
79
- await this.core.effects.emit(import_types.AccountListHooks.OnAccountListUpdate, this.store);
80
79
  if (this.store.accounts.length === 1) {
81
80
  this.setActiveAccount(accountModule.getId());
82
81
  }
82
+ await this.core.effects.emit(import_types.AccountListHooks.OnAccountListUpdate, this.store);
83
83
  } catch (error) {
84
84
  console.error(error);
85
85
  this.store.error = error instanceof Error ? error.message : "Failed to add account";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@pisell/pisellos",
4
- "version": "0.0.20",
4
+ "version": "0.0.21",
5
5
  "description": "一个可扩展的前端模块化SDK框架,支持插件系统",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",