Skip to content

Commit

Permalink
Add CookiePermission
Browse files Browse the repository at this point in the history
  • Loading branch information
Radomir98 committed Oct 7, 2024
1 parent d8051e6 commit dc1f1c3
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) {
PluginManager.register('CookiePermission', CookiePermissionPlugin, '[data-cookie-permission]');

Check failure on line 105 in src/Resources/app/storefront/src/js/plugin/nosto-configuration.plugin.js

View workflow job for this annotation

GitHub Actions / ESLint

'PluginManager' is not defined
}
const instances = window.PluginManager.getPluginInstances('CookiePermission');
Iterator.iterate(instances, instance => {
instance.$emitter.subscribe('onClickDenyButton', () => {
Expand Down

0 comments on commit dc1f1c3

Please sign in to comment.