提交 5dd46ae3 编写于 作者: J Johannes Rieken

MIN_value ain't negative.... #23215

上级 b4a8131e
......@@ -261,7 +261,7 @@ suite('Filters', () => {
});
function assertTopScore(filter: typeof fuzzyScore, pattern: string, expected: number, ...words: string[]) {
let topScore = Number.MIN_VALUE;
let topScore = -Number.MIN_VALUE;
let topIdx = 0;
for (let i = 0; i < words.length; i++) {
const word = words[i];
......@@ -310,5 +310,6 @@ suite('Filters', () => {
// // dupe, issue #14942
assertTopScore(fuzzyScore, 'is', 0, 'isValidViewletId', 'import statement');
assertTopScore(fuzzyScore, 'title', 1, 'files.trimTrailingWhitespace', 'window.title');
});
});
......@@ -105,7 +105,7 @@ export class CompletionModel {
const { leadingLineContent, characterCountDelta } = this._lineContext;
let word = '';
let topScore = Number.MIN_VALUE;
let topScore = -Number.MIN_VALUE;
for (const item of this._items) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册