@antscorp/antsomi-ui 1.3.5-beta.624 → 1.3.5-beta.625

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,12 +21,13 @@ export const AccountListing = React.forwardRef((props, ref) => {
21
21
  }), [recentData, accountData]);
22
22
  // Handlers
23
23
  const handleSelectAccount = useCallback((userId) => {
24
- const currentRecent = (recentData === null || recentData === void 0 ? void 0 : recentData.value) || [];
24
+ const currentRecent = (recentData === null || recentData === void 0 ? void 0 : recentData.value.filter(Boolean).slice(0, 2)) || [];
25
25
  const body = userId !== currentRecent[0]
26
26
  ? [userId, currentRecent[0]]
27
- : currentRecent[1]
28
- ? [userId, currentRecent[1]]
29
- : [userId, currentRecent[0]];
27
+ : // Check the second current account is existed
28
+ currentRecent[1]
29
+ ? [userId, currentRecent[1]]
30
+ : [userId, undefined];
30
31
  updateRecentAccount(body.map(id => Number(id)));
31
32
  onChange === null || onChange === void 0 ? void 0 : onChange(userId);
32
33
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antscorp/antsomi-ui",
3
- "version": "1.3.5-beta.624",
3
+ "version": "1.3.5-beta.625",
4
4
  "description": "An enterprise-class UI design language and React UI library.",
5
5
  "sideEffects": [
6
6
  "dist/*",