Skip to content

Commit

Permalink
Merge pull request #1309 from ch-routerank/fix-hardcoded-node-modules
Browse files Browse the repository at this point in the history
replace hardcoded 'node_modules' path
  • Loading branch information
miles-grant-ibigroup authored Dec 2, 2024
2 parents bad8e44 + f1df1bf commit c728287
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/util/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,9 @@ async function loadOtpUiLocaleData(matchedLocale) {
.filter((pkg) => pkg.startsWith('@opentripplanner'))
.map(async (pkg) => {
try {
const packagePath = pkg.replace('@opentripplanner/', '')
const msgs = await import(
`../../node_modules/${pkg}/i18n/${matchedLocale}.yml`
`@opentripplanner/${packagePath}/i18n/${matchedLocale}.yml`
)
if (msgs) return msgs.default
} catch (ex) {
Expand Down

0 comments on commit c728287

Please sign in to comment.