Bug 32104: Prevent console error on additonal-contents.pl
To test: 1. Make a new HTML customization, news item, or page with the text editor ( CodeMirror ). 2. Save the content ( not Save and continue ) 3. Notice the console error: 4. Apply patch 5. Try 1 & 2 again. 6. No error. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
ecec606572
commit
c59db1605d
1 changed files with 3 additions and 1 deletions
|
@ -680,7 +680,9 @@
|
|||
/* Activate first tab and initialize its CodeMirror instance */
|
||||
let firstTab = $("#tabs a:first");
|
||||
firstTab.tab("show");
|
||||
initCodeMirror( firstTab[0].hash );
|
||||
if ( firstTab[0] ) {
|
||||
initCodeMirror( firstTab[0].hash );
|
||||
}
|
||||
}
|
||||
|
||||
$("#tabs a[data-toggle='tab']").on("shown.bs.tab", function (e) {
|
||||
|
|
Loading…
Reference in a new issue