fix error meesage on successful error message (#3387)

Co-authored-by: Rahul R <rahulr@Rahuls-MacBook-Pro.local>
This commit is contained in:
rahulramesha 2024-01-17 16:35:21 +05:30 committed by GitHub
parent 942785b7c0
commit c0cd201b7c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 5 deletions

View File

@ -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 (
<>

View File

@ -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 };