Skip to content

Commit

Permalink
Merge pull request #1186 from partkeepr/fix/1173-fix-failed-search-oc…
Browse files Browse the repository at this point in the history
…topart

Do not access length of null
  • Loading branch information
christianlupus authored Feb 8, 2021
2 parents e4e3ff3 + 283bcfc commit c6323d5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ Ext.define("PartKeepr.Components.OctoPart.SearchPanel", {
},
checkForErrors: function (data)
{
if (data.results.length == 0 && data.errors.length > 0) {
if (data.results.length == 0 && data.errors && data.errors.length > 0) {
Ext.Msg.alert(i18n("Octopart Error"), data.errors.map(e => e.message).join());
}

Expand Down

0 comments on commit c6323d5

Please sign in to comment.