This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch staging
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git
The following commit(s) were added to refs/heads/staging by this push:
new 9b9a1a9 AIRAVATA-3489 Check that editor was created before tearing it
down
9b9a1a9 is described below
commit 9b9a1a92ef27d8ad3689bc918db583174b5f96a2
Author: Marcus Christie <[email protected]>
AuthorDate: Thu Jul 15 13:32:29 2021 -0400
AIRAVATA-3489 Check that editor was created before tearing it down
---
.../components/storage/storage-edit/UserStorageTextEditViewer.vue | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git
a/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/storage/storage-edit/UserStorageTextEditViewer.vue
b/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/storage/storage-edit/UserStorageTextEditViewer.vue
index 14a5428..49cd2c8 100644
---
a/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/storage/storage-edit/UserStorageTextEditViewer.vue
+++
b/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/storage/storage-edit/UserStorageTextEditViewer.vue
@@ -66,7 +66,11 @@ export default {
this.setFileContent();
},
destroyed() {
- this.editor.getWrapperElement().remove();
+ // this.editor is created only when the file is small enough to be
+ // previewed/edited in browser
+ if (this.editor) {
+ this.editor.getWrapperElement().remove();
+ }
},
computed: {
editAvailable() {