@@ -213,34 +213,29 @@ export default function transformStylexProps(
213213 if ( nonNullProps === true ) {
214214 styleNonNullProps = true ;
215215 } else {
216- try {
217- const { confident, value : styleValue } = evaluate (
218- path ,
219- state ,
220- evaluatePathFnConfig ,
221- ) ;
222- if (
223- ! confident ||
224- styleValue == null ||
225- styleValue . __IS_PROXY === true
226- ) {
227- nonNullProps = true ;
228- styleNonNullProps = true ;
229- } else {
230- styleNonNullProps =
231- nonNullProps === true ? true : [ ...nonNullProps ] ;
232- if ( nonNullProps !== true ) {
233- nonNullProps = [
234- ...nonNullProps ,
235- ...Object . keys ( styleValue ) . filter (
236- ( key ) => styleValue [ key ] !== null ,
237- ) ,
238- ] ;
239- }
240- }
241- } catch {
216+ const { confident, value : styleValue } = evaluate (
217+ path ,
218+ state ,
219+ evaluatePathFnConfig ,
220+ ) ;
221+ if (
222+ ! confident ||
223+ styleValue == null ||
224+ styleValue . __IS_PROXY === true
225+ ) {
242226 nonNullProps = true ;
243227 styleNonNullProps = true ;
228+ } else {
229+ styleNonNullProps =
230+ nonNullProps === true ? true : [ ...nonNullProps ] ;
231+ if ( nonNullProps !== true ) {
232+ nonNullProps = [
233+ ...nonNullProps ,
234+ ...Object . keys ( styleValue ) . filter (
235+ ( key ) => styleValue [ key ] !== null ,
236+ ) ,
237+ ] ;
238+ }
244239 }
245240 }
246241
@@ -361,20 +356,16 @@ function parseNullableStyle(
361356 }
362357 }
363358
364- try {
365- const parsedObj = evaluate ( path , state , evaluatePathFnConfig ) ;
366- if (
367- parsedObj . confident &&
368- parsedObj . value != null &&
369- typeof parsedObj . value === 'object'
370- ) {
371- if ( parsedObj . value . __IS_PROXY === true ) {
372- return 'other' ;
373- }
374- return parsedObj . value ;
359+ const parsedObj = evaluate ( path , state , evaluatePathFnConfig ) ;
360+ if (
361+ parsedObj . confident &&
362+ parsedObj . value != null &&
363+ typeof parsedObj . value === 'object'
364+ ) {
365+ if ( parsedObj . value . __IS_PROXY === true ) {
366+ return 'other' ;
375367 }
376- } catch {
377- return 'other' ;
368+ return parsedObj . value ;
378369 }
379370
380371 return 'other' ;
0 commit comments