From bf15d1ea420ebe7bd69bcd58520d73197ef2d871 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sat, 15 Feb 2025 10:42:47 +0100 Subject: [PATCH] [ticket/17326] Check for existence of font icon element before use PHPBB-17326 --- phpBB/adm/style/admin.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/phpBB/adm/style/admin.js b/phpBB/adm/style/admin.js index f53329b5a7..f308bf9c12 100644 --- a/phpBB/adm/style/admin.js +++ b/phpBB/adm/style/admin.js @@ -291,12 +291,14 @@ function parse_document(container) const pageIconFont = document.getElementById('bbcode_font_icon'); - pageIconFont.addEventListener('keyup', function() { - updateIconClass(this.nextElementSibling, this.value); - }); + if (pageIconFont) { + pageIconFont.addEventListener('keyup', function () { + updateIconClass(this.nextElementSibling, this.value); + }); - pageIconFont.addEventListener('blur', function() { - updateIconClass(this.nextElementSibling, this.value); - }); + pageIconFont.addEventListener('blur', function () { + updateIconClass(this.nextElementSibling, this.value); + }); + } }); })(jQuery);