Skip to content

Commit aff8b86

Browse files
committed
allow external scripts in content to be reloaded
1 parent 3a0c268 commit aff8b86

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

encryptcontent/decrypt-contents.tpl.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,12 @@ function reload_js(src) {
137137
if (script_tag) {
138138
script_tag.remove();
139139
new_script_tag = document.createElement('script');
140-
new_script_tag.innerHTML = script_tag.innerHTML;
140+
if (script_tag.innerHTML) {
141+
new_script_tag.innerHTML = script_tag.innerHTML;
142+
}
143+
if (script_tag.src) {
144+
new_script_tag.src = script_tag.src;
145+
}
141146
head.appendChild(new_script_tag);
142147
}
143148
} else {

0 commit comments

Comments
 (0)