Skip to content

Commit

Permalink
validate only not empty inputs (doc gen will fail otherwise)
Browse files Browse the repository at this point in the history
  • Loading branch information
candiduslynx committed Sep 20, 2023
1 parent 2725ed5 commit 00de940
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugin/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ func (p *Plugin) Init(ctx context.Context, spec []byte, options NewClientOptions
defer p.mu.Unlock()
var err error

if p.schemaValidator != nil {
if len(spec) > 0 && p.schemaValidator != nil {
var v any
if err := json.Unmarshal(spec, &v); err != nil {
return fmt.Errorf("failed to unmarshal plugin spec: %w", err)
Expand Down

0 comments on commit 00de940

Please sign in to comment.