From 283bcfc22e275b10c20157074b2ac7202264c313 Mon Sep 17 00:00:00 2001 From: Christian Wolf Date: Sun, 7 Feb 2021 17:06:17 +0100 Subject: [PATCH] Do not access length of null --- .../Resources/public/js/Components/OctoPart/SearchPanel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/OctoPart/SearchPanel.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/OctoPart/SearchPanel.js index 1f146f572..f62671cfe 100644 --- a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/OctoPart/SearchPanel.js +++ b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/OctoPart/SearchPanel.js @@ -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()); }