From 9f9758598a82fb0e2ba4f70b22d093cd7c7a2921 Mon Sep 17 00:00:00 2001 From: Philipp Pracht Date: Fri, 17 Dec 2021 13:54:24 +0100 Subject: [PATCH] hotfix intent param with dash (#2443) --- core/src/utilities/helpers/routing-helpers.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/utilities/helpers/routing-helpers.js b/core/src/utilities/helpers/routing-helpers.js index c17214a3de..a176ecfa4d 100644 --- a/core/src/utilities/helpers/routing-helpers.js +++ b/core/src/utilities/helpers/routing-helpers.js @@ -361,8 +361,9 @@ class RoutingHelpersClass { getIntentObject(intentLink) { const intentParams = intentLink.split('?intent=')[1]; if (intentParams) { - const elements = intentParams.split('-'); - if (elements.length === 2) { + const firstDash = intentParams.indexOf('-'); + if (firstDash > 0) { + const elements = [intentParams.slice(0, firstDash), intentParams.slice(firstDash + 1)]; // avoids usage of '-' in semantic object and action const semanticObject = elements[0]; const actionAndParams = elements[1].split('?');