fix console error on hidden syntax-highlight directive

This commit is contained in:
Keith Grant
2019-08-13 09:35:28 -07:00
committed by Jim Ladd
parent 965dc79a0a
commit 62f31d6b3f

View File

@@ -35,6 +35,9 @@ function atSyntaxHighlightController ($scope, AngularCodeMirror) {
scrollbarStyle: null, scrollbarStyle: null,
} }
}); });
if (document.querySelector(`.ng-hide #${$scope.name}_codemirror`)) {
return;
}
codeMirror.showTextArea({ codeMirror.showTextArea({
scope: $scope, scope: $scope,
model: varName, model: varName,