mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-23 00:22:56 +01:00
TypeError: Cannot read property 'getText' of null. Fixes Microsoft/monaco-editor#354
This commit is contained in:
parent
1a124f5415
commit
a3fe14998f
1 changed files with 6 additions and 3 deletions
|
|
@ -43,9 +43,12 @@ export class CSSWorker {
|
||||||
|
|
||||||
doValidation(uri: string): Promise<ls.Diagnostic[]> {
|
doValidation(uri: string): Promise<ls.Diagnostic[]> {
|
||||||
let document = this._getTextDocument(uri);
|
let document = this._getTextDocument(uri);
|
||||||
let stylesheet = this._languageService.parseStylesheet(document);
|
if (document) {
|
||||||
let diagnostics = this._languageService.doValidation(document, stylesheet);
|
let stylesheet = this._languageService.parseStylesheet(document);
|
||||||
return Promise.as(diagnostics)
|
let diagnostics = this._languageService.doValidation(document, stylesheet);
|
||||||
|
return Promise.as(diagnostics)
|
||||||
|
}
|
||||||
|
return Promise.as([]);
|
||||||
}
|
}
|
||||||
doComplete(uri: string, position: ls.Position): Promise<ls.CompletionList> {
|
doComplete(uri: string, position: ls.Position): Promise<ls.CompletionList> {
|
||||||
let document = this._getTextDocument(uri);
|
let document = this._getTextDocument(uri);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue