Skip to content

Commit ee9e463

Browse files
committed
fix strict null errors
1 parent c6c7eda commit ee9e463

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/vs/editor/contrib/wordHighlighter/wordHighlighter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ abstract class OccurenceAtPositionRequest implements IOccurenceAtPositionRequest
106106

107107
class SemanticOccurenceAtPositionRequest extends OccurenceAtPositionRequest {
108108
protected _compute(model: ITextModel, selection: Selection, wordSeparators: string, token: CancellationToken): Promise<DocumentHighlight[]> {
109-
return getOccurrencesAtPosition(model, selection.getPosition(), token);
109+
return getOccurrencesAtPosition(model, selection.getPosition(), token).then(value => value || []);
110110
}
111111
}
112112

src/vs/platform/url/common/urlService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export class URLService implements IURLService {
2020

2121
open(uri: URI): Promise<boolean> {
2222
const handlers = Array.from(this.handlers);
23-
return first(handlers.map(h => () => h.handleURL(uri)), undefined, false);
23+
return first(handlers.map(h => () => h.handleURL(uri)), undefined, false).then(val => val || false);
2424
}
2525

2626
registerHandler(handler: IURLHandler): IDisposable {

0 commit comments

Comments
 (0)