Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSP-143 schlanser.ch - Cookie-Error is shown in Console v4 #91

Merged
merged 2 commits into from
Oct 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading