Skip to content

Commit

Permalink
Merge pull request #16334 from pahan35/fix/silence-unexpected-color-w…
Browse files Browse the repository at this point in the history
…arning/16322

bug: silence unexpected control type enum for color matchers
  • Loading branch information
ndelangen authored Jul 1, 2022
2 parents 4cfdbbf + dac12e5 commit bca0ad6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/store/src/inferControls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ const inferControl = (argType: StrictInputType, name: string, matchers: Controls
return { control: { type: 'color' } };
}

logger.warn(
`Addon controls: Control of type color only supports string, received "${controlType}" instead`
);
if (controlType !== 'enum') {
logger.warn(
`Addon controls: Control of type color only supports string, received "${controlType}" instead`
);
}
}

// args that end with date e.g. purchaseDate
Expand Down

0 comments on commit bca0ad6

Please sign in to comment.