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];