From 511b29844db95963ab4cbb6b9f8b0ad21068d1b0 Mon Sep 17 00:00:00 2001 From: Nicolas Widart Date: Thu, 14 Sep 2017 11:37:39 +0200 Subject: [PATCH] Only set the tags of they're not null --- Modules/Tag/Assets/js/components/TagInput.vue | 4 +++- public/js/app.js | 9 ++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Modules/Tag/Assets/js/components/TagInput.vue b/Modules/Tag/Assets/js/components/TagInput.vue index c28f53667..173efc10c 100644 --- a/Modules/Tag/Assets/js/components/TagInput.vue +++ b/Modules/Tag/Assets/js/components/TagInput.vue @@ -31,7 +31,9 @@ }, watch: { currentTags: function () { - this.tags = this.currentTags; + if (this.currentTags !== null) { + this.tags = this.currentTags; + } } }, mounted() { diff --git a/public/js/app.js b/public/js/app.js index 4fc4af960..3a68b5dfc 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -69914,7 +69914,8 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); mixins: [__WEBPACK_IMPORTED_MODULE_1__Core_Assets_js_mixins_Translate__["a" /* default */], __WEBPACK_IMPORTED_MODULE_2__Core_Assets_js_mixins_Slugify__["a" /* default */]], props: { locales: { default: null }, - pageId: { default: null } + pageId: { default: null }, + route: { default: null } }, data: function data() { return { @@ -69948,7 +69949,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); this.form = new __WEBPACK_IMPORTED_MODULE_3_form_backend_validation___default.a(_.merge(this.page, { tags: this.tags })); this.loading = true; - this.form.post(route('api.page.page.store')).then(function (response) { + this.form.post(this.route).then(function (response) { _this.loading = false; _this.$message({ type: 'success', @@ -70933,7 +70934,9 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); }, watch: { currentTags: function currentTags() { - this.tags = this.currentTags; + if (this.currentTags !== null) { + this.tags = this.currentTags; + } } }, mounted: function mounted() {