Skip to content

Commit 0ec7f89

Browse files
committed
Skip SetSiteConfig when no data is given
Mach Composer now always calls the SetSiteConfig and sometimes there is data for the plugin, and sometimes not
1 parent 336b1b9 commit 0ec7f89

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

internal/plugin.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ func (p *ContentfulPlugin) SetGlobalConfig(data map[string]any) error {
6666
}
6767

6868
func (p *ContentfulPlugin) SetSiteConfig(site string, data map[string]any) error {
69+
if len(data) == 0 {
70+
return nil
71+
}
72+
6973
cfg := ContentfulConfig{}
7074
if err := mapstructure.Decode(data, &cfg); err != nil {
7175
return err

0 commit comments

Comments
 (0)