From df188da2aa5cd7113fd39c594b16a2539b7c34f4 Mon Sep 17 00:00:00 2001 From: Aria Minaei Date: Sun, 10 Apr 2022 19:17:28 +0200 Subject: [PATCH] Small refactor https://github.com/theatre-js/theatre/pull/118#discussion_r846630232 --- theatre/core/src/propTypes/index.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/theatre/core/src/propTypes/index.ts b/theatre/core/src/propTypes/index.ts index 54836eb..81d496c 100644 --- a/theatre/core/src/propTypes/index.ts +++ b/theatre/core/src/propTypes/index.ts @@ -124,10 +124,7 @@ export const compound = ( const deserializedSub = propConfig.deserialize( (json as $IntentionalAny)[key] as unknown, ) - if ( - typeof deserializedSub !== 'undefined' && - deserializedSub !== null - ) { + if (deserializedSub != null) { atLeastOnePropWasDeserialized = true deserialized[key] = deserializedSub }