Skip to content

Commit 0da9f3f

Browse files
committed
[json] Trying to set local JSON Schema file, generates empty files while typing the filename. Fixes microsoft#92300
1 parent d2d9498 commit 0da9f3f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

  • extensions/json-language-features/client/src

extensions/json-language-features/client/src/jsonMain.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,9 @@ export function activate(context: ExtensionContext) {
188188
// handle content request
189189
client.onRequest(VSCodeContentRequest.type, (uriPath: string) => {
190190
const uri = Uri.parse(uriPath);
191+
if (uri.scheme === 'untitled') {
192+
return Promise.reject(new Error(localize('untitled.schema', 'Unable to load {0}', uri.toString())));
193+
}
191194
if (uri.scheme !== 'http' && uri.scheme !== 'https') {
192195
return workspace.openTextDocument(uri).then(doc => {
193196
schemaDocuments[uri.toString()] = true;

0 commit comments

Comments
 (0)