fix: don't try to parse header tint color if not a string

closes #9822
This commit is contained in:
Satyajit Sahoo
2021-08-17 16:07:59 +02:00
parent f54cafbb33
commit ece03d7177

View File

@@ -625,7 +625,7 @@ export default class CardStack extends React.Component<Props, State> {
let headerDarkContent: boolean | undefined;
if (headerShown) {
if (headerTintColor) {
if (typeof headerTintColor === 'string') {
headerDarkContent = Color(headerTintColor).isDark();
} else if (typeof headerBackgroundColor === 'string') {
headerDarkContent = !Color(headerBackgroundColor).isDark();