cordo 2.9.0 → 2.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@ export function text(...content: Array<string | { toString: () => string }>) {
|
|
|
10
10
|
|
|
11
11
|
function toString(attributes: Record<string, any> = {}): string {
|
|
12
12
|
const stringContent = content
|
|
13
|
-
.map(c =>
|
|
13
|
+
.map(c => String(c))
|
|
14
14
|
.map(c => Hooks.callHook('transformUserFacingText', c, { ...attributes, component: 'TextDisplay', position: null }))
|
|
15
15
|
const innerContent = (innerPrefix ?? '') + stringContent.join(' ').replace(/^ +| +$/mg, '') + (innerSuffix ?? '')
|
|
16
16
|
const outerContent = linkUrl
|
|
@@ -92,7 +92,8 @@ export async function evalRun(path: string, flags: number, i: CordoInteraction):
|
|
|
92
92
|
CordoGateway.respondTo(i, null) // we'll ack this so that any rendering done further down does not spill into the new error message
|
|
93
93
|
|
|
94
94
|
const currentRoute = CordoMagic.getCwd()
|
|
95
|
-
const
|
|
95
|
+
const currentRouteId = RoutingResolve.getRouteFromPath(currentRoute, false)?.routeId
|
|
96
|
+
const parsedRoute = currentRouteId ? RoutingResolve.getRouteFromId(currentRouteId) : null
|
|
96
97
|
if (parsedRoute) {
|
|
97
98
|
const request = RoutingRespond.buildRouteRequest(parsedRoute, route.args, i, opts)
|
|
98
99
|
if (request) {
|