We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2294a51 + 9180e27 commit 9967ab4Copy full SHA for 9967ab4
1 file changed
web/genericl10n.js
@@ -121,7 +121,10 @@ class GenericL10n extends L10n {
121
const { href } = document.querySelector(`link[type="application/l10n"]`);
122
const paths = await fetchData(href, /* type = */ "json");
123
124
- return { baseURL: href.replace(/[^/]*$/, "") || "./", paths };
+ return {
125
+ baseURL: href.substring(0, href.lastIndexOf("/") + 1) || "./",
126
+ paths,
127
+ };
128
} catch {}
129
return { baseURL: "./", paths: Object.create(null) };
130
}
0 commit comments