summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/autosave.js
diff options
context:
space:
mode:
authorFelipe Artur <fcardozo@gitlab.com>2018-06-21 12:22:40 +0000
committerTim Zallmann <tzallmann@gitlab.com>2018-06-21 12:22:40 +0000
commit3e66795ef1ff1228906239763910b051d8afcc37 (patch)
treedf6424d9ec008f5d1da455f8465681b371c4a11e /app/assets/javascripts/autosave.js
parent14e35ac9b19d358d84e0cfd167f74036937285b6 (diff)
downloadgitlab-ce-3e66795ef1ff1228906239763910b051d8afcc37.tar.gz
Changes tab VUE refactoring
Diffstat (limited to 'app/assets/javascripts/autosave.js')
-rw-r--r--app/assets/javascripts/autosave.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/assets/javascripts/autosave.js b/app/assets/javascripts/autosave.js
index 959e6289502..fa00a3cf386 100644
--- a/app/assets/javascripts/autosave.js
+++ b/app/assets/javascripts/autosave.js
@@ -31,7 +31,9 @@ export default class Autosave {
// https://github.com/vuejs/vue/issues/2804#issuecomment-216968137
const event = new Event('change', { bubbles: true, cancelable: false });
const field = this.field.get(0);
- field.dispatchEvent(event);
+ if (field) {
+ field.dispatchEvent(event);
+ }
}
save() {