mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
[json] Trying to set local JSON Schema file, generates empty files while typing the filename. Fixes #92300
This commit is contained in:
parent
d2d9498c73
commit
0da9f3f250
|
@ -188,6 +188,9 @@ export function activate(context: ExtensionContext) {
|
|||
// handle content request
|
||||
client.onRequest(VSCodeContentRequest.type, (uriPath: string) => {
|
||||
const uri = Uri.parse(uriPath);
|
||||
if (uri.scheme === 'untitled') {
|
||||
return Promise.reject(new Error(localize('untitled.schema', 'Unable to load {0}', uri.toString())));
|
||||
}
|
||||
if (uri.scheme !== 'http' && uri.scheme !== 'https') {
|
||||
return workspace.openTextDocument(uri).then(doc => {
|
||||
schemaDocuments[uri.toString()] = true;
|
||||
|
|
Loading…
Reference in a new issue