Skip to content

Commit af3469a

Browse files
husel-tseboo
authored andcommitted
LUT-28908: Correction of a null error in js when adding a tag if the user did not have the right to do so
1 parent 4340884 commit af3469a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

webapp/WEB-INF/templates/admin/plugins/blog/blog_commons.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -396,9 +396,11 @@
396396
});
397397

398398
const btnCreateTag = document.querySelector( "#createTag" )
399-
btnCreateTag.addEventListener( 'click', event => {
400-
createTag( idBlog );
401-
});
399+
if (btnCreateTag){
400+
btnCreateTag.addEventListener( 'click', event => {
401+
createTag( idBlog );
402+
});
403+
}
402404

403405
const btnAddFiles = document.querySelector("#btn-add-files")
404406
btnAddFiles.addEventListener( 'click', event => {

0 commit comments

Comments
 (0)