Inside a custom default the config object can be {} when _extends is used.
To workaround it, you need to write something like this:
configs
.map(config => {
let labels = config.labels ? config.labels : config;
if (Object.keys(labels).length === 0) labels = undefined
return {labels: labels || []};
})
if you returned undefined after deleting the _extends key that would make it easier to merge objects.