Skip to content
This repository was archived by the owner on Jul 31, 2023. It is now read-only.

Commit e24532a

Browse files
committed
Return immediately if a setting get is undefined. Resolves #431
1 parent 18a4d7b commit e24532a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

server/src/SettingsCache.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ class SettingsCache<P extends WorkspaceFolder | TextDocument, T> {
7070
}
7171

7272
public async get(target: P | string): Promise<T | undefined> {
73+
if (!target) return undefined;
7374
const key = typeof target === 'string' ? target : target.uri;
7475
let settings: T = this.cache.get(key);
7576
if (!settings) {

0 commit comments

Comments
 (0)