From 62f31d6b3f38438416995e3241bb3fde1e1b30ce Mon Sep 17 00:00:00 2001 From: Keith Grant Date: Tue, 13 Aug 2019 09:35:28 -0700 Subject: [PATCH] fix console error on hidden syntax-highlight directive --- .../components/syntax-highlight/syntax-highlight.directive.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/awx/ui/client/lib/components/syntax-highlight/syntax-highlight.directive.js b/awx/ui/client/lib/components/syntax-highlight/syntax-highlight.directive.js index fdfa1f7205..23c78fb5cf 100644 --- a/awx/ui/client/lib/components/syntax-highlight/syntax-highlight.directive.js +++ b/awx/ui/client/lib/components/syntax-highlight/syntax-highlight.directive.js @@ -35,6 +35,9 @@ function atSyntaxHighlightController ($scope, AngularCodeMirror) { scrollbarStyle: null, } }); + if (document.querySelector(`.ng-hide #${$scope.name}_codemirror`)) { + return; + } codeMirror.showTextArea({ scope: $scope, model: varName,