#23 Fix if preloader always hidden
Previous if statement did not work because it still was found in DOM so it only was pushed into the array but not executed.
This commit is contained in:
parent
5f63ecb336
commit
324b3f5c76
|
@ -32,7 +32,8 @@ function findPreloader() {
|
|||
}
|
||||
|
||||
function runAfterLoad(func, pattern = '.*') {
|
||||
if (findPreloader()) {
|
||||
let preloader = findPreloader();
|
||||
if (typeof preloader !== undefined && preloader.style.display !== "none") {
|
||||
__afterLoadScripts.push({ "function": func, "pattern": pattern });
|
||||
} else {
|
||||
func();
|
||||
|
|
Loading…
Reference in a new issue