Update webloader.js

This commit is contained in:
Namhyeon Go 2020-07-04 22:35:35 +09:00 committed by GitHub
parent 47273e75b8
commit 1efde7737c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -140,7 +140,7 @@ return {
el.charset = "utf-8";
document.head.appendChild(el);
if (typeof(test) === "function") {
if (typeof(test) === "function" && typeof(callback) === "function") {
// "Time-To-Live: default value is 30 seconds";
ttl = (typeof(ttl) == "number" ? ttl : 30000);
el.onload = _callback(el, ttl);