Skip to content

Commit

Permalink
Merge pull request #91 from Nosto/SSP-143_cookie_error_is_shown_in_co…
Browse files Browse the repository at this point in the history
…nsole_v4

SSP-143 schlanser.ch - Cookie-Error is shown in Console v4
  • Loading branch information
Bibarella authored Oct 14, 2024
2 parents d8051e6 + f1df067 commit 1ca7c80
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import DomAccess from 'src/helper/dom-access.helper';
import Iterator from 'src/helper/iterator.helper';
import CookieStorage from 'src/helper/storage/cookie-storage.helper';
import { COOKIE_CONFIGURATION_UPDATE } from 'src/plugin/cookie/cookie-configuration.plugin';
import CookiePermissionPlugin from 'src/plugin/cookie/cookie-permission.plugin';

export const NOSTO_COOKIE_KEY = 'nosto-integration-track-allow'

Expand Down Expand Up @@ -98,6 +99,11 @@ export default class NostoConfiguration extends window.PluginBaseClass {
}

cookieSubscriber() {
const allPlugins = window.PluginManager.getPluginList();
const isPluginRegistered = Object.keys(allPlugins).includes('CookiePermission');
if (!isPluginRegistered) {
window.PluginManager.register('CookiePermission', CookiePermissionPlugin, '[data-cookie-permission]');
}
const instances = window.PluginManager.getPluginInstances('CookiePermission');
Iterator.iterate(instances, instance => {
instance.$emitter.subscribe('onClickDenyButton', () => {
Expand Down

0 comments on commit 1ca7c80

Please sign in to comment.