aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/lib/scripts/page.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/scripts/page.js')
-rw-r--r--lib/scripts/page.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/scripts/page.js b/lib/scripts/page.js
index baacee238..0bb75b961 100644
--- a/lib/scripts/page.js
+++ b/lib/scripts/page.js
@@ -26,7 +26,9 @@ dw_page = {
*/
.each(function () {
let $tgt = jQuery(this).parent();
- const nr = $tgt.attr('class').match(/(\s+|^)editbutton_(\d+)(\s+|$)/)[2];
+ const match = $tgt.attr('class').match(/(\s+|^)editbutton_(\d+)(\s+|$)/);
+ if(!match) return;
+ const nr = match[2];
let $highlight = jQuery(); // holder for elements in the section to be highlighted
const $highlightWrap = jQuery('<div class="section_highlight_wrapper"></div>');