bug not opening search panel solved

This commit is contained in:
Gerard 2019-01-15 14:53:38 +01:00
parent b60deafff1
commit 3b5ea47848
1 changed files with 4 additions and 4 deletions

View File

@ -3,8 +3,8 @@ import SearchPanel from 'core/components/searchbar/search-panel';
class Controller extends SearchPanel {
set filter(value) {
if (!value.tags)
value.tags = [{}];
if (!value || !value.tags)
value = {tags: [{}]};
this.$.filter = value;
}
@ -17,11 +17,11 @@ class Controller extends SearchPanel {
if (!selection || selection.isFree === true)
return null;
if (selection.sourceTable)
if (selection.sourceTable) {
return '/api/'
+ selection.sourceTable.charAt(0).toUpperCase()
+ selection.sourceTable.substring(1) + 's';
else if (selection.sourceTable == null)
} else if (selection.sourceTable == null)
return `/api/ItemTags/filterItemTags/${selection.id}`;
}
}