File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
inbox/modals/create-edit-modal Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ export const InboxIssueCreateRoot: FC<TInboxIssueCreateRoot> = observer((props)
81
81
const handleFormSubmit = async ( event : FormEvent < HTMLFormElement > ) => {
82
82
event . preventDefault ( ) ;
83
83
84
- if ( descriptionEditorRef . current ?. isEditorReadyToDiscard ( ) ) {
84
+ if ( ! descriptionEditorRef . current ?. isEditorReadyToDiscard ( ) ) {
85
85
setToast ( {
86
86
type : TOAST_TYPE . ERROR ,
87
87
title : "Error!" ,
Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ export const IssueFormRoot: FC<IssueFormProps> = observer((props) => {
122
122
const { getProjectById } = useProject ( ) ;
123
123
const { areEstimatesEnabledForProject } = useEstimate ( ) ;
124
124
125
- function handleKeyDown ( event : KeyboardEvent ) {
125
+ const handleKeyDown = ( event : KeyboardEvent ) => {
126
126
if ( editorRef . current ?. isEditorReadyToDiscard ( ) ) {
127
127
onClose ( ) ;
128
128
} else {
@@ -133,7 +133,7 @@ export const IssueFormRoot: FC<IssueFormProps> = observer((props) => {
133
133
} ) ;
134
134
event . preventDefault ( ) ; // Prevent default action if editor is not ready to discard
135
135
}
136
- }
136
+ } ;
137
137
138
138
useKeypress ( "Escape" , handleKeyDown ) ;
139
139
You can’t perform that action at this time.
0 commit comments