Skip to content
This repository has been archived by the owner on May 4, 2022. It is now read-only.

WIP: fix: fail safe when portlet lacks title #798

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ It's not that this feature is unwelcome, it's just that it's not currently real.
* Removed defective (always zero) search results total badge (#797)
* Alphabetically sort by `title` not `name` in app directory browse (#791)
* Made `relatedPortlets` arrays empty in `entries.json` (#787)
* Fail safe when `portlet` data record lacks `title` (#798)

### Dependency upgrades

Expand Down
4 changes: 3 additions & 1 deletion web/src/main/webapp/my-app/marketplace/services.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,9 @@ define(['angular', 'jquery'], function(angular, $) {
var lowerSearchTerm = searchTerm.toLowerCase();

// check title
if (portlet.title.toLowerCase().indexOf(lowerSearchTerm) !== -1) {
if (portlet
&& portlet.title
&& portlet.title.toLowerCase().indexOf(lowerSearchTerm) !== -1) {
return true;
}

Expand Down