提交 2fd13c37 编写于 作者: J Johannes Rieken

make score always return a number as spec'd, #21886

上级 fcc508fd
......@@ -91,7 +91,7 @@ export function score(selector: LanguageSelector, candidateUri: URI, candidateLa
}
} else {
return undefined;
return 0;
}
}
......
......@@ -18,8 +18,8 @@ suite('LanguageSelector', function () {
test('score, invalid selector', function () {
assert.equal(score({}, model.uri, model.language), 0);
assert.equal(score(undefined, model.uri, model.language), undefined);
assert.equal(score(null, model.uri, model.language), undefined);
assert.equal(score(undefined, model.uri, model.language), 0);
assert.equal(score(null, model.uri, model.language), 0);
assert.equal(score('', model.uri, model.language), 0);
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册