提交 059cc5b6 编写于 作者: J Johannes Rieken

fix unhandled error

上级 c87cbe63
......@@ -53,7 +53,7 @@ export class ExtHostDecorations implements ExtHostDecorationsShape {
}
const { provider, extensionId } = this._provider.get(handle);
return asWinJsPromise(token => provider.provideDecoration(URI.revive(uri), token)).then(data => {
if (data.letter && data.letter.length !== 1) {
if (data && data.letter && data.letter.length !== 1) {
console.warn(`INVALID decoration from extension '${extensionId}'. The 'letter' must be set and be one character, not '${data.letter}'.`);
}
result[id] = data && <DecorationData>[data.priority, data.bubble, data.title, data.letter, data.color, data.source];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册