forked from github/plane
fix error meesage on successful error message (#3387)
Co-authored-by: Rahul R <rahulr@Rahuls-MacBook-Pro.local>
This commit is contained in:
parent
942785b7c0
commit
c0cd201b7c
@ -47,8 +47,8 @@ export const CycleLayoutRoot: React.FC = observer(() => {
|
||||
|
||||
const activeLayout = issueFilters?.displayFilters?.layout;
|
||||
|
||||
const cycleDetails = cycleId ? cycleStore.cycle_details[cycleId.toString()] : undefined;
|
||||
const cycleStatus = cycleDetails?.status.toLocaleLowerCase() ?? "draft";
|
||||
const cycleDetails = cycleId ? cycleStore?.cycle_details?.[cycleId.toString()] : undefined;
|
||||
const cycleStatus = cycleDetails?.status?.toLocaleLowerCase() ?? "draft";
|
||||
|
||||
return (
|
||||
<>
|
||||
|
@ -200,7 +200,7 @@ export class CycleIssuesStore extends IssueBaseStore implements ICycleIssuesStor
|
||||
|
||||
try {
|
||||
const response = await this.rootStore.projectIssues.createIssue(workspaceSlug, projectId, data);
|
||||
const issueToCycle = await this.addIssueToCycle(workspaceSlug, cycleId, [response.id], false);
|
||||
await this.addIssueToCycle(workspaceSlug, cycleId, [response.id], false);
|
||||
|
||||
let _issues = this.issues;
|
||||
if (!_issues) _issues = {};
|
||||
@ -211,7 +211,7 @@ export class CycleIssuesStore extends IssueBaseStore implements ICycleIssuesStor
|
||||
this.issues = _issues;
|
||||
});
|
||||
|
||||
return issueToCycle;
|
||||
return response;
|
||||
} catch (error) {
|
||||
this.fetchIssues(workspaceSlug, projectId, "mutation", cycleId);
|
||||
throw error;
|
||||
@ -298,7 +298,7 @@ export class CycleIssuesStore extends IssueBaseStore implements ICycleIssuesStor
|
||||
|
||||
const response = await this.createIssue(workspaceSlug, projectId, data, cycleId);
|
||||
|
||||
if (this.issues) {
|
||||
if (this.issues && response) {
|
||||
delete this.issues[cycleId][data.id as keyof IIssue];
|
||||
|
||||
let _issues = { ...this.issues };
|
||||
|
Loading…
Reference in New Issue
Block a user