File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,11 @@ describe('withLDConsumer', () => {
3434
3535 test ( 'ldClient is passed down through context api' , ( ) => {
3636 const Home = ( props : HocProps ) => (
37- < div > { props . ldClient && props . ldClient . track ? 'ldClient detected' : 'Negative, no ldClient' } </ div >
37+ < div >
38+ { props . ldClient && Object . hasOwnProperty . call ( props . ldClient , 'track' )
39+ ? 'ldClient detected'
40+ : 'Negative, no ldClient' }
41+ </ div >
3842 ) ;
3943 const HomeWithFlags = withLDConsumer ( ) ( Home ) ;
4044 const component = create ( < HomeWithFlags /> ) ;
@@ -45,7 +49,9 @@ describe('withLDConsumer', () => {
4549 const Home = ( props : HocProps ) => (
4650 < div >
4751 { props . flags ? 'flags detected' : 'Negative, no flag' }
48- { props . ldClient && props . ldClient . track ? 'ldClient detected' : 'Negative, no ldClient' }
52+ { props . ldClient && Object . hasOwnProperty . call ( props . ldClient , 'track' )
53+ ? 'ldClient detected'
54+ : 'Negative, no ldClient' }
4955 </ div >
5056 ) ;
5157 const HomeWithFlags = withLDConsumer ( { clientOnly : true } ) ( Home ) ;
You can’t perform that action at this time.
0 commit comments