From 51d4ae089f4bdc5a8dadc9b6a45d25c85451636e Mon Sep 17 00:00:00 2001 From: lishuang Date: Sat, 22 Jul 2023 20:17:45 +0800 Subject: [PATCH] feat: change the new Space --- src/common/model/user/User.ts | 2 +- src/pages/matter/List.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/model/user/User.ts b/src/common/model/user/User.ts index 9c39ecf..7ab13ef 100644 --- a/src/common/model/user/User.ts +++ b/src/common/model/user/User.ts @@ -31,7 +31,7 @@ export default class User extends BaseEntity { lastTime: Date = new Date(); status: UserStatus = UserStatus.OK; spaceUuid: string | null = null; - space: Space | null = null; + space: Space = new Space(); constructor(reactComponent?: React.Component) { super(reactComponent); diff --git a/src/pages/matter/List.tsx b/src/pages/matter/List.tsx index 5acfa48..6b11fcd 100644 --- a/src/pages/matter/List.tsx +++ b/src/pages/matter/List.tsx @@ -427,7 +427,7 @@ export default class List extends TankComponent { m.spaceUuid = this.getSpaceUuid(); //判断文件大小。 - if (this.user.space!.sizeLimit >= 0) { + if (this.user.space.sizeLimit >= 0) { if (file.size > this.user.space!.sizeLimit) { MessageBoxUtil.error( Lang.t(