Skip to content

Commit

Permalink
#44 Check if Piwik is loaded with ppms var
Browse files Browse the repository at this point in the history
  • Loading branch information
MGHollander committed Sep 25, 2023
1 parent 3e43ad7 commit dbfd283
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion resources/views/privacy.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class='ppms_cm_data_subject_form_textarea'
(function (window, document) {
// Check if Piwik is loaded.
setTimeout(function () {
if (typeof Piwik !== 'undefined' && Piwik.initialized) {
if (ppms?.cm?.api.length > 0) {
document.getElementById('piwikConsentForm').classList.remove('hidden');
document.getElementById('piwikConsentForm').classList.add('flex');
} else {
Expand Down

0 comments on commit dbfd283

Please sign in to comment.