sean-adams / dataslayer

A Chrome extension to enhance tag management and analytics debugging.
MIT License
73 stars 18 forks source link

Push undefined values does not work #158

Open patoperpetua opened 2 years ago

patoperpetua commented 2 years ago

When pushing undefined values for a published key, the values does not refresh. When going to gtm console it shows the values correctly but the plugin does not update state when sending undefined values

patoperpetua commented 2 years ago

I think the problem may come from the file App.js

setOption = (option, value) => { let options = this.state.options; if (typeof value === 'boolean') { options[option] = value; } else if (typeof value === 'string') { if (value.length === 0) { options[option] = []; } else { options[option] = value.split(';'); } <<<<<<<<<<<<<<<<< a missing condition when the value provided is undefined }