From ce33eb3abdeaeb745c188991181bfa04aa938b07 Mon Sep 17 00:00:00 2001 From: zadam Date: Fri, 6 Nov 2020 21:52:57 +0100 Subject: [PATCH] fix wrong behavior when customResourceProvider has empty value, fixes #1393 --- src/routes/custom.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/routes/custom.js b/src/routes/custom.js index 5f26a4276..5c811b425 100644 --- a/src/routes/custom.js +++ b/src/routes/custom.js @@ -12,6 +12,10 @@ async function handleRequest(req, res) { const attrs = repository.getEntities("SELECT * FROM attributes WHERE isDeleted = 0 AND type = 'label' AND name IN ('customRequestHandler', 'customResourceProvider')"); for (const attr of attrs) { + if (!attr.value.trim()) { + continue; + } + const regex = new RegExp(attr.value); let match;