Skip to content

Commit

Permalink
Only set the tags of they're not null
Browse files Browse the repository at this point in the history
  • Loading branch information
nWidart committed Sep 14, 2017
1 parent a21b691 commit 511b298
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 3 additions & 1 deletion Modules/Tag/Assets/js/components/TagInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
},
watch: {
currentTags: function () {
this.tags = this.currentTags;
if (this.currentTags !== null) {
this.tags = this.currentTags;
}
}
},
mounted() {
Expand Down
9 changes: 6 additions & 3 deletions public/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit 511b298

Please sign in to comment.