kiwicom/orbit

CountryFlag code defaultProp 'anywhere'

Closed this issue ยท 4 comments

When working with grahpql, types are nullable by default. It would be great to have anywhere as default prop to CountryFlag. So we don't have to do this every time <CountryFlag code={location?.country?.code ?? 'anywhere'} />

Nevermind me, seems this is already implemented.

I am going to reopen this, because <CountryFlag code={location?.country?.code} /> this gives error

Screenshot 2019-08-24 at 11 03 44

It was merged in #801 so it looks like it was reverted later.

vepor commented

Actually, from #801 it was optional property, not nullable. Will be fixed by #1190