Skip to content

Commit a85844d

Browse files
author
veedrin
committed
修复已删除的工作空间用户名显示undefined的问题
1 parent 44d6e41 commit a85844d

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

app/dashboard/view/workspace/Workspace.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ class Workspace extends Component {
204204
const item = res[i];
205205
const ws = {};
206206
ws.spaceKey = item.spaceKey;
207-
ws.ownerGlobalKey = item.ownerGlobalKey;
207+
ws.ownerGlobalKey = item.owner.globalKey;
208208
// 无远端仓库有一个 workspaceName 字段
209209
ws.projectName = item.workspaceName && item.workspaceName !== 'default' ? item.workspaceName : item.project.name;
210210
ws.repoUrl = item.projectHtmlUrl;

app/dashboard/view/workspace/card/Card.js

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,12 @@ class Card extends Component {
8080
{
8181
workingStatus !== 'Invalid' ? (
8282
<div className="control">
83-
{
84-
workingStatus === 'Online' && (globalKey === ownerGlobalKey) && (
85-
<div className="act" onClick={(event) => this.handleMask(stopOption, event)}>
86-
<i className="fa fa-stop-circle-o"></i>
87-
<span>{i18n('global.stop')}</span>
88-
</div>
89-
)
90-
}
83+
{workingStatus === 'Online' && (globalKey === ownerGlobalKey) && (
84+
<div className="act" onClick={(event) => this.handleMask(stopOption, event)}>
85+
<i className="fa fa-stop-circle-o"></i>
86+
<span>{i18n('global.stop')}</span>
87+
</div>
88+
)}
9189
{
9290
globalKey === ownerGlobalKey ? (
9391
<div className="act" onClick={(event) => this.handleMask(deleteOption, event)}>

0 commit comments

Comments
 (0)