Skip to content

Commit

Permalink
Do not access length of null
Browse files Browse the repository at this point in the history
  • Loading branch information
christianlupus committed Feb 8, 2021
1 parent e4e3ff3 commit 283bcfc
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 283bcfc

Please sign in to comment.