From 0f59d53f799749e16a7954eba7acb65c7f139040 Mon Sep 17 00:00:00 2001 From: Philipp Pracht Date: Fri, 20 Dec 2024 10:10:58 +0100 Subject: [PATCH] Mitigation of potential backwards compatibility issue (#4078) --- core/src/services/web-components.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/src/services/web-components.js b/core/src/services/web-components.js index 485f04d0e5..79a883e02a 100644 --- a/core/src/services/web-components.js +++ b/core/src/services/web-components.js @@ -70,9 +70,13 @@ class WebComponentSvcClass { get(target, prop) { if (prop === target.getCurrentRoute.name) { return () => { - return new Promise((resolve) => { + const pm = new Promise((resolve) => { resolve(target.getCurrentRoute()); }); + pm.toString = () => { + return target.getCurrentRoute(); + }; + return pm; }; } return target[prop];