Skip to content

Commit 2f8644b

Browse files
committed
chore: warningProps is not force required
1 parent d40a9f8 commit 2f8644b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/generate.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ export interface GenerateConfig<OptionsType extends object[]> {
183183
) => OptionsType;
184184
/** Check if a value is disabled */
185185
isValueDisabled: (value: RawValueType, options: FlattenOptionsType<OptionsType>) => boolean;
186-
warningProps: (props: any) => void;
186+
warningProps?: (props: any) => void;
187187
fillOptionsWithMissingValue?: (
188188
options: OptionsType,
189189
value: DefaultValueType,
@@ -841,7 +841,7 @@ export default function generateSelector<
841841
}
842842

843843
// ============================ Warning =============================
844-
if (process.env.NODE_ENV !== 'production') {
844+
if (process.env.NODE_ENV !== 'production' && warningProps) {
845845
warningProps(props);
846846
}
847847

0 commit comments

Comments
 (0)