Skip to content

Commit

Permalink
Fix: regression introduced in previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
orestbida committed Oct 22, 2023
1 parent 3fcdb0c commit baf6380
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/scripts.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { globalObj } from '../core/global';
import { createNode, setAttribute, elContains, getAttribute, removeAttribute, isFunction } from './general';
import { SCRIPT_TAG_SELECTOR } from './constants';
import { SCRIPT_TAG_SELECTOR, OPT_OUT_MODE } from './constants';

/**
* @param {string} type
Expand Down Expand Up @@ -204,7 +204,7 @@ export const retrieveEnabledCategoriesAndServices = () => {
for(const categoryName of state._allCategoryNames){
const category = state._allDefinedCategories[categoryName];

if(category.readOnly || (category.enabled && state._invalidConsent)){
if(category.readOnly || (category.enabled && state._userConfig.mode === OPT_OUT_MODE)){
state._defaultEnabledCategories.push(categoryName);

const services = state._allDefinedServices[categoryName] || {};
Expand Down

0 comments on commit baf6380

Please sign in to comment.