Skip to content

Commit

Permalink
Fix load event for auto mode + auto consent
Browse files Browse the repository at this point in the history
  • Loading branch information
AmauriC committed Oct 21, 2024
1 parent d6c2eea commit 2425c40
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion tarteaucitron.js
Original file line number Diff line number Diff line change
Expand Up @@ -1133,12 +1133,18 @@ var tarteaucitron = {
if (typeof tarteaucitronMagic === 'undefined' || tarteaucitronMagic.indexOf("_" + service.key + "_") < 0) {
if(true === state && typeof service.js === 'function') {
service.js();
tarteaucitron.sendEvent(service.key + '_loaded');
} else if (typeof service.fallback === 'function') {
service.fallback();
}
}

if (true === state) {
tarteaucitron.sendEvent(service.key + '_loaded');
}

if (true === state || false === state) {
tarteaucitron.state[service.key] = state;
}
tarteaucitron.userInterface.color(service.key, state);

if( 'wait' === state ) {
Expand Down
2 changes: 1 addition & 1 deletion tarteaucitron.min.js

Large diffs are not rendered by default.

0 comments on commit 2425c40

Please sign in to comment.