From 54d78f6c86bea7e23e2f5f349d6a5a37d3cbdaba Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Thu, 6 Aug 2020 15:11:10 -0400 Subject: [PATCH] APIv4 Explorer - Fix possible undefined index --- ang/api4Explorer/Explorer.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ang/api4Explorer/Explorer.js b/ang/api4Explorer/Explorer.js index 10ed8f6147..41750691c6 100644 --- a/ang/api4Explorer/Explorer.js +++ b/ang/api4Explorer/Explorer.js @@ -326,7 +326,11 @@ } // Then lookup implicit links _.each(path, function(node) { - entity = _.find(links[entity], {alias: node}).entity; + var link = _.find(links[entity], {alias: node}); + if (!link) { + return false; + } + entity = link.entity; }); return entity; } -- 2.25.1