1
0
mirror of https://git.tuxpa.in/a/code-server.git synced 2024-12-26 04:14:29 +00:00

Add /vscode to nls fetch

A plugin may modify the root endpoint which will make /resource no
longer work so always use /vscode/resource instead.
This commit is contained in:
Asher 2020-09-09 12:05:44 -05:00
parent 938b460685
commit ffe6a663aa
No known key found for this signature in database
GPG Key ID: D63C1EF81242354A

View File

@ -17,7 +17,7 @@ try {
}
// FIXME: Only works if path separators are /.
const path = nlsConfig._resolvedLanguagePackCoreLocation + "/" + bundle.replace(/\//g, "!") + ".nls.json"
fetch(`${options.base}/resource/?path=${encodeURIComponent(path)}`)
fetch(`${options.base}/vscode/resource/?path=${encodeURIComponent(path)}`)
.then((response) => response.json())
.then((json) => {
bundles[bundle] = json