提交 ee9e463e 编写于 作者: J Johannes Rieken

fix strict null errors

上级 c6c7edaa
...@@ -106,7 +106,7 @@ abstract class OccurenceAtPositionRequest implements IOccurenceAtPositionRequest ...@@ -106,7 +106,7 @@ abstract class OccurenceAtPositionRequest implements IOccurenceAtPositionRequest
class SemanticOccurenceAtPositionRequest extends OccurenceAtPositionRequest { class SemanticOccurenceAtPositionRequest extends OccurenceAtPositionRequest {
protected _compute(model: ITextModel, selection: Selection, wordSeparators: string, token: CancellationToken): Promise<DocumentHighlight[]> { protected _compute(model: ITextModel, selection: Selection, wordSeparators: string, token: CancellationToken): Promise<DocumentHighlight[]> {
return getOccurrencesAtPosition(model, selection.getPosition(), token); return getOccurrencesAtPosition(model, selection.getPosition(), token).then(value => value || []);
} }
} }
......
...@@ -20,7 +20,7 @@ export class URLService implements IURLService { ...@@ -20,7 +20,7 @@ export class URLService implements IURLService {
open(uri: URI): Promise<boolean> { open(uri: URI): Promise<boolean> {
const handlers = Array.from(this.handlers); const handlers = Array.from(this.handlers);
return first(handlers.map(h => () => h.handleURL(uri)), undefined, false); return first(handlers.map(h => () => h.handleURL(uri)), undefined, false).then(val => val || false);
} }
registerHandler(handler: IURLHandler): IDisposable { registerHandler(handler: IURLHandler): IDisposable {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册