提交 710824bc 编写于 作者: M Martin Aeschlimann

fix NPE accessing docElement

上级 edecd8bc
...@@ -36,7 +36,7 @@ export class BracketElectricCharacterSupport implements modes.IRichEditElectricC ...@@ -36,7 +36,7 @@ export class BracketElectricCharacterSupport implements modes.IRichEditElectricC
this._registry = registry; this._registry = registry;
this._modeId = modeId; this._modeId = modeId;
this.contribution = contribution || {}; this.contribution = contribution || {};
this.brackets = new Brackets(modeId, brackets, autoClosePairs, contribution.docComment); this.brackets = new Brackets(modeId, brackets, autoClosePairs, this.contribution.docComment);
} }
public getElectricCharacters(): string[]{ public getElectricCharacters(): string[]{
...@@ -74,7 +74,7 @@ export class Brackets { ...@@ -74,7 +74,7 @@ export class Brackets {
this._complexAutoClosePairs = autoClosePairs.filter(pair => pair.open.length > 1 && !!pair.close); this._complexAutoClosePairs = autoClosePairs.filter(pair => pair.open.length > 1 && !!pair.close);
if (docComment) { if (docComment) {
// IDocComment is legacy, only partially supported // IDocComment is legacy, only partially supported
this._complexAutoClosePairs.push({ open:docComment.open, close: docComment.close }); this._complexAutoClosePairs.push({ open: docComment.open, close: docComment.close });
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册