weareheavy / nuxt-cookie-consent

MIT License
3 stars 1 forks source link

Use of defu in CookieInformation provider in wrong order #1

Closed henriksjodahl closed 7 months ago

henriksjodahl commented 7 months ago

The default value is in the wrong order. culture: 'EN' always override the configured value.

https://github.com/weareheavy/nuxt-cookie-consent/blob/58c03ca7e5c07c51411e188a8836cb2ae7554208/src/module.ts#L52-L57

should be

config = defu( 
   config, 
   { 
     culture: 'EN', 
   }, 
 ) 

https://github.com/unjs/defu?tab=readme-ov-file#usage

tkjaergaard commented 7 months ago

@henriksjodahl Good catch! I'll look into it 🙂

tkjaergaard commented 7 months ago

@henriksjodahl Try pulling version 1.0.3 and see if that helps 🙂

henriksjodahl commented 7 months ago

Perfect, thanks!