Merge pull request #532 from prudloff-insite/patch-1
Callback called too soon for external scripts
This commit is contained in:
commit
94cf8b232f
|
|
@ -1598,7 +1598,7 @@ var tarteaucitron = {
|
|||
}
|
||||
|
||||
if (typeof callback === 'function') {
|
||||
if ( !tarteaucitron.parameters.useExternalJs ) {
|
||||
if ( !tarteaucitron.parameters.useExternalJs || !internal ) {
|
||||
script.onreadystatechange = script.onload = function () {
|
||||
var state = script.readyState;
|
||||
if (!done && (!state || /loaded|complete/.test(state))) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue