From 58f40fbed8b8184476d658f7574d7f55c4f5fd3c Mon Sep 17 00:00:00 2001 From: Grzegorz Leoniec Date: Sun, 24 Feb 2019 20:04:38 +0100 Subject: [PATCH] Improve imput.js for editor use --- src/system/components/data-input/shared/input.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/system/components/data-input/shared/input.js b/src/system/components/data-input/shared/input.js index 5ccf32b5b..954f52051 100755 --- a/src/system/components/data-input/shared/input.js +++ b/src/system/components/data-input/shared/input.js @@ -117,12 +117,12 @@ export default { } }, created() { - if (this.$parentForm) { + if (this.$parentForm && this.model) { this.$parentForm.subscribe(this.handleFormUpdate) } }, beforeDestroy() { - if (this.$parentForm) { + if (this.$parentForm && this.model) { this.$parentForm.unsubscribe(this.handleFormUpdate) } }, @@ -132,7 +132,7 @@ export default { }, input(value) { this.innerValue = value - if (this.$parentForm) { + if (this.$parentForm && this.model) { this.$parentForm.update(this.model, value) } else { /**