From ede184bcf3031c4d8d44aefdd9425063c71a4c9e Mon Sep 17 00:00:00 2001 From: David Menc Date: Tue, 17 Sep 2024 14:32:37 +0200 Subject: [PATCH] fixup! Fix layout context prop resolving for boolean types (#567) --- src/components/_helpers/resolveContextOrProp.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/components/_helpers/resolveContextOrProp.js b/src/components/_helpers/resolveContextOrProp.js index 7b45cfd6..61c21529 100644 --- a/src/components/_helpers/resolveContextOrProp.js +++ b/src/components/_helpers/resolveContextOrProp.js @@ -1,11 +1,7 @@ export const resolveContextOrProp = (contextValue, propValue) => { - if (contextValue === false) { + if (contextValue === false || contextValue === null) { return propValue; } - if (contextValue != null) { - return contextValue; - } - - return propValue; + return contextValue; };