Skip to content

Commit a792582

Browse files
committed
Merge pull request #87 from charpeni/fix-statusbar-color
Fix statusbar color when headerStyle is provided
2 parents af0a0cd + b5ca97f commit a792582

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,9 +348,9 @@ class Router extends React.Component {
348348
if (!_.has(statusBarProps, 'backgroundColor') && !_.has(statusBarProps, 'translucent')) {
349349
let backgroundColor;
350350

351-
if (this.state.route && this.state.route.headerStyle && this.state.router.headerStyle.backgroundColor) {
351+
if (this.state.route && this.state.route.headerStyle) {
352352
// If current route has specific header style
353-
const stateHeaderStyle = StyleSheet.flatten(this.props.headerStyle);
353+
const stateHeaderStyle = StyleSheet.flatten(this.state.route.headerStyle);
354354

355355
if (stateHeaderStyle && stateHeaderStyle.backgroundColor) {
356356
backgroundColor = stateHeaderStyle.backgroundColor;

0 commit comments

Comments
 (0)