mirror of
https://github.com/ansible/awx.git
synced 2026-01-18 13:11:19 -03:30
prevent console errors when code mirror parses invalid syntax
This commit is contained in:
parent
7b16931658
commit
95f5315fa3
@ -17,10 +17,12 @@ function atCodeMirrorModalController (
|
||||
} else if ($scope.disabled === 'false') {
|
||||
$scope.disabled = false;
|
||||
}
|
||||
const editor = $(`${CodeMirrorModalID} .CodeMirror`)[0].CodeMirror;
|
||||
const height = $(ModalHeight).height() - $(ModalHeader).height() -
|
||||
$(ModalFooter).height() - 100;
|
||||
editor.setSize('100%', height);
|
||||
const editor = $(`${CodeMirrorModalID} .CodeMirror`)[0];
|
||||
if (editor) {
|
||||
const height = $(ModalHeight).height() - $(ModalHeader).height() -
|
||||
$(ModalFooter).height() - 100;
|
||||
editor.CodeMirror.setSize('100%', height);
|
||||
}
|
||||
}
|
||||
|
||||
function toggle () {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user