image.tags is a simple array of strings, not an object with 'name',
filter tags correctly. Leave filter by key 'name' in there for backward
compatibility.

Signed-off-by: Florian Orben <florian.orben@schmetterling.de>
This commit is contained in:
Florian Orben 2018-10-21 15:11:15 +02:00
Родитель 27fefac1ad
Коммит f62c438a99
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -178,7 +178,7 @@ var ImageCard = React.createClass({
} else if (this.state.tags.length === 0) {
tags = <div className="no-items">No Tags</div>;
} else {
var tagDisplay = this.state.tags.filter(tag => tag.name.includes(this.state.searchTag)).map((tag) => {
var tagDisplay = this.state.tags.filter(tag => (tag && tag.name || tag || '').includes(this.state.searchTag)).map((tag) => {
let t = '';
if (tag.name) {
t = tag.name;