File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed
features/excercise/exercise-pages/code-submission
shared/store/modal-notice-state Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ export class CodeSubmissionComponent {
129129
130130 canDeactivate ( ) : Observable < boolean > {
131131 if ( ! this . codeEditorComponent . getCode ( ) ) return of ( true ) ;
132- if ( this . codeEditorComponent . getCode ( ) ) {
132+ if ( this . codeEditorComponent . getCode ( ) && ! this . submitted ) {
133133 return this . modalNoticeService . confirm (
134134 'Xác nhận thoát' ,
135135 'Bạn có chắc muốn thoát? Dữ liệu sẽ mất.' ,
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ export class ModalNoticeService {
1515 confirmText : string ,
1616 cancelText : string
1717 ) : Observable < boolean > {
18+ this . decision$ = new Subject < boolean > ( ) ;
1819 this . store . dispatch (
1920 openNoticeModal ( {
2021 payload : {
You can’t perform that action at this time.
0 commit comments