Describe the bug
When list widget has empty array as default value, removing all values from it results in array of one empty string
To Reproduce
- label: Posts
label_singular: post
name: post
fields:
- {label: Title, name: title, widget: string}
- {label: Tags, name: tags, widget: list, allow_add: true, required: false, default: []}
- {label: Body, name: body, widget: markdown}
---
title: Test
tags: []
---
test
---
title: Test
tags:
- tag
---
test
---
title: Test
tags:
- ""
---
test
Expected behavior
After removing all tags data should be the following
---
title: Test
tags: []
---
test
Was trying to find this list widget, but there are quite a few files there, can you you gimme a hand with finding where it is? Thanks!
Sorry, can't figure out how to fix this :-( Looking through the code, but it doesn't make sense why this would give "" instead of []
I am happy to have a look at this.
Most helpful comment
@Serhazor https://github.com/netlify/netlify-cms/tree/master/packages/netlify-cms-widget-list