提交 eb17ea78 编写于 作者: B Benjamin Pasero

fix some npes

上级 88d91e54
......@@ -622,6 +622,10 @@ export function startsWithUTF8BOM(str: string): boolean {
export function score(target: string, query: string): number {
let score = 0;
if (!target || !query) {
return score; // return early if target or query are undefined
}
const queryLen = query.length;
const targetLower = target.toLowerCase();
const queryLower = query.toLowerCase();
......
......@@ -186,7 +186,7 @@ export class QuickOpenEntry {
}
}
return compareAnything(nameA, nameB, lookFor.toLowerCase());
return compareAnything(nameA, nameB, lookFor ? lookFor.toLowerCase() : lookFor);
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册