@arcblock/ux 2.8.9 → 2.8.10

Sign up to get free protection for your applications and to get access to all the features.
@@ -42,7 +42,7 @@ export default function UserInfo({
42
42
  return false;
43
43
  }, [onSwitchProfile, switchProfile, hasBindWallet, session.provider]);
44
44
  const _onSwitchProfile = useMemoizedFn(() => {
45
- if (window.blocklet.appPid) {
45
+ if (window.blocklet?.appPid) {
46
46
  window.location.href = '/.well-known/service/user/profile';
47
47
  } else if (canEdit) {
48
48
  onSwitchProfile();
@@ -58,7 +58,8 @@ function UserInfo(_ref) {
58
58
  return false;
59
59
  }, [onSwitchProfile, switchProfile, hasBindWallet, session.provider]);
60
60
  const _onSwitchProfile = (0, _ahooks.useMemoizedFn)(() => {
61
- if (window.blocklet.appPid) {
61
+ var _window$blocklet;
62
+ if ((_window$blocklet = window.blocklet) !== null && _window$blocklet !== void 0 && _window$blocklet.appPid) {
62
63
  window.location.href = '/.well-known/service/user/profile';
63
64
  } else if (canEdit) {
64
65
  onSwitchProfile();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcblock/ux",
3
- "version": "2.8.9",
3
+ "version": "2.8.10",
4
4
  "description": "Common used react components for arcblock products",
5
5
  "keywords": [
6
6
  "react",
@@ -322,11 +322,11 @@
322
322
  "peerDependencies": {
323
323
  "react": ">=18.1.0"
324
324
  },
325
- "gitHead": "945dc70b969f6c1edb9c13b908a621246ac40804",
325
+ "gitHead": "74f5ae7693bc89c5af45817acd7d56d1e6974552",
326
326
  "dependencies": {
327
327
  "@arcblock/did-motif": "^1.1.13",
328
- "@arcblock/icons": "^2.8.9",
329
- "@arcblock/react-hooks": "^2.8.9",
328
+ "@arcblock/icons": "^2.8.10",
329
+ "@arcblock/react-hooks": "^2.8.10",
330
330
  "@babel/plugin-syntax-dynamic-import": "^7.8.3",
331
331
  "@emotion/react": "^11.10.4",
332
332
  "@emotion/styled": "^11.10.4",
@@ -36,7 +36,7 @@ export default function UserInfo({ session, locale, onSwitchProfile, onSwitchPas
36
36
  }, [onSwitchProfile, switchProfile, hasBindWallet, session.provider]);
37
37
 
38
38
  const _onSwitchProfile = useMemoizedFn(() => {
39
- if (window.blocklet.appPid) {
39
+ if (window.blocklet?.appPid) {
40
40
  window.location.href = '/.well-known/service/user/profile';
41
41
  } else if (canEdit) {
42
42
  onSwitchProfile();