kopia lustrzana https://github.com/FacilMap/facilmap
Fix handling of empty pad/marker/line names in table export
rodzic
304b56d9c6
commit
997509cda0
|
@ -36,7 +36,7 @@
|
|||
</head>
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<h1><%=padData.name%> – FacilMap</h1>
|
||||
<h1><%=normalizePadName(padData.name)%> – FacilMap</h1>
|
||||
<%
|
||||
for(let type of Object.values(types)) {
|
||||
-%>
|
||||
|
@ -89,7 +89,7 @@
|
|||
<%
|
||||
if(!hide.includes("Name")) {
|
||||
-%>
|
||||
<td><%=object.name%></td>
|
||||
<td><%=type.type === "marker" ? normalizeMarkerName(object.name) : normalizeLineName(object.name)%></td>
|
||||
<%
|
||||
}
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ import * as ejs from "ejs";
|
|||
import * as utils from "facilmap-utils";
|
||||
import { Router, type RequestHandler } from "express";
|
||||
import { static as expressStatic } from "express";
|
||||
import { normalizeLineName, normalizeMarkerName, normalizePadName } from "facilmap-utils";
|
||||
|
||||
export const isDevMode = !!process.env.FM_DEV;
|
||||
|
||||
|
@ -92,6 +93,9 @@ export async function renderTable(params: {
|
|||
...injections,
|
||||
paths,
|
||||
utils,
|
||||
normalizeMarkerName,
|
||||
normalizeLineName,
|
||||
normalizePadName,
|
||||
...params
|
||||
});
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue