mirror of
https://github.com/portainer/portainer.git
synced 2025-08-05 13:55:21 +02:00
fix(edge/jobs): fix get edge job file content [EE-2702] (#6622)
This commit is contained in:
parent
b846c8e6d2
commit
8860d72f70
7 changed files with 16 additions and 14 deletions
|
@ -126,7 +126,7 @@ export class EdgeJobController {
|
|||
}
|
||||
|
||||
async uiCanExit() {
|
||||
if (this.edgeJob.FileContent !== this.oldFileContent && this.state.isEditorDirty) {
|
||||
if (this.edgeJob && this.edgeJob.FileContent !== this.oldFileContent && this.state.isEditorDirty) {
|
||||
return this.ModalService.confirmWebEditorDiscard();
|
||||
}
|
||||
}
|
||||
|
@ -165,7 +165,7 @@ export class EdgeJobController {
|
|||
}
|
||||
|
||||
this.$window.onbeforeunload = () => {
|
||||
if (this.edgeJob.FileContent !== this.oldFileContent && this.state.isEditorDirty) {
|
||||
if (this.edgeJob && this.edgeJob.FileContent !== this.oldFileContent && this.state.isEditorDirty) {
|
||||
return '';
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue