Skip to content

Commit fe00ed0

Browse files
authored
Merge pull request #663 from Idrinth/patch-1
fix: unhandled exception when category is unknown
2 parents ff70aa6 + 3758404 commit fe00ed0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/api.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ export const acceptService = (service, category) => {
129129
*/
130130
export const acceptedService = (service, category) => {
131131
const acceptedServices = !globalObj._state._invalidConsent
132-
? globalObj._state._acceptedServices[category]
132+
? (globalObj._state._acceptedServices[category] || [])
133133
: [];
134134

135135
return elContains(acceptedServices, service);

0 commit comments

Comments
 (0)