litestar-vite-plugin 0.6.1 → 0.6.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/inertia-helpers/index.js
CHANGED
|
@@ -14,12 +14,12 @@ export function route(routeName, ...args) {
|
|
|
14
14
|
let url = globalThis.routes[routeName];
|
|
15
15
|
if (!url) {
|
|
16
16
|
console.error(`URL '${routeName}' not found in routes.`);
|
|
17
|
-
return
|
|
17
|
+
return "#"; // Return "#" to indicate failure
|
|
18
18
|
}
|
|
19
19
|
const argTokens = url.match(/<(\w+:?)?\w+>/g);
|
|
20
20
|
if (!argTokens && args.length > 0) {
|
|
21
21
|
console.error(`Invalid URL lookup: URL '${routeName}' does not expect arguments.`);
|
|
22
|
-
return
|
|
22
|
+
return "#";
|
|
23
23
|
}
|
|
24
24
|
try {
|
|
25
25
|
if (typeof args[0] === "object" && !Array.isArray(args[0])) {
|
|
@@ -50,7 +50,7 @@ export function route(routeName, ...args) {
|
|
|
50
50
|
}
|
|
51
51
|
catch (error) {
|
|
52
52
|
console.error(error.message);
|
|
53
|
-
return
|
|
53
|
+
return "#";
|
|
54
54
|
}
|
|
55
55
|
return url;
|
|
56
56
|
}
|