check array.length, not array, fixes #23404

This commit is contained in:
Johannes Rieken
2017-03-30 17:42:31 +02:00
parent 2f315f1021
commit bbe4c8de6f
@@ -29,7 +29,7 @@ import EditorContextKeys = editorCommon.EditorContextKeys;
function alertFormattingEdits(edits: editorCommon.ISingleEditOperation[]): void {
edits = edits.filter(edit => edit.range);
if (!edits) {
if (!edits.length) {
return;
}