提交 0b0450b1 编写于 作者: F Felipe Santos 提交者: Christof Marti

Fix README.md detection in welcome page

上级 d9b234e5
......@@ -75,9 +75,10 @@ export class WelcomePageContribution implements IWorkbenchContribution {
const folderUri = folder.uri;
return fileService.resolve(folderUri)
.then(folder => {
const files = folder.children ? folder.children.map(child => child.name) : [];
const files = folder.children ? folder.children.map(child => child.name).sort() : [];
const file = files.find(file => file.toLowerCase() === 'readme.md') || files.find(file => file.toLowerCase().startsWith('readme'));
const file = files.sort().find(file => file.toLowerCase().startsWith('readme'));
if (file) {
return joinPath(folderUri, file);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册