🐛 Fixed the image viewer init & add demo.

This commit is contained in:
elkan1788
2024-07-21 14:06:03 +08:00
parent 082fb48650
commit f8ac686c1c
2 changed files with 44 additions and 1 deletions

View File

@@ -58,7 +58,10 @@ NexT.utils = {
},
registerImageViewer: function() {
new Viewer(document.querySelector('.post-body'),{ navbar:2, toolbar:2 });
const post_body = document.querySelector('.post-body');
if (post_body) {
new Viewer(post_body,{ navbar:2, toolbar:2 });
}
},
registerToolButtons: function () {