fix: add null check for preview reference in loadScripts method

This commit is contained in:
jmal 2025-08-22 20:25:40 +08:00
parent 1fa7ee311e
commit 74e4b5b3c7

View File

@ -209,6 +209,9 @@ export default {
methods: {
loadScripts() {
const preview = this.$refs.previewFooterHtml;
if (!preview) return;
const scripts = preview.querySelectorAll('script');
scripts.forEach(script => {