We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3808ce4 commit 4c2d51fCopy full SHA for 4c2d51f
src/components/_helpers/resolveContextOrProp.js
@@ -1,7 +1,10 @@
1
export const resolveContextOrProp = (contextValue, propValue) => {
2
- if (contextValue != null) {
3
- return contextValue;
+ // We need to test:
+ // * `false` - for when the `contextValue` is boolean
4
+ // * `null` - for when the `contextValue` is non-boolean
5
+ if (contextValue === false || contextValue === null) {
6
+ return propValue;
7
}
8
- return propValue;
9
+ return contextValue;
10
};
0 commit comments