Some changes
gitea/salix/2112-order_catalog_improvements This commit looks good Details

This commit is contained in:
Joan Sanchez 2020-02-19 12:34:33 +01:00
parent c9fd48b0cd
commit 9e435e9553
1 changed files with 5 additions and 4 deletions

View File

@ -278,18 +278,19 @@ class Controller {
updateStateParams() { updateStateParams() {
const params = {}; const params = {};
params.categoryId = undefined;
if (this.categoryId) if (this.categoryId)
params.categoryId = this.categoryId; params.categoryId = this.categoryId;
else params.categoryId = undefined;
params.typeId = undefined;
if (this.typeId) if (this.typeId)
params.typeId = this.typeId; params.typeId = this.typeId;
else params.typeId = undefined;
params.itemId = undefined;
if (this.itemId) if (this.itemId)
params.itemId = this.itemId; params.itemId = this.itemId;
else params.itemId = undefined;
params.tags = undefined;
if (this.tags.length) { if (this.tags.length) {
const tags = []; const tags = [];
for (let tag of this.tags) { for (let tag of this.tags) {
@ -306,7 +307,7 @@ class Controller {
} }
params.tags = JSON.stringify(tags); params.tags = JSON.stringify(tags);
} else params.tags = undefined; }
this.$state.go(this.$state.current.name, params); this.$state.go(this.$state.current.name, params);
} }