From de4a82e6ad797d763eb176c1ce1da5e4da7c8198 Mon Sep 17 00:00:00 2001 From: Eric Raio Date: Tue, 12 Jan 2016 22:55:30 +0900 Subject: [PATCH] fixing defect where statusbar is null on android devices --- index.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index e4e17fb..05251b4 100644 --- a/index.js +++ b/index.js @@ -121,10 +121,12 @@ var Router = React.createClass({ render: function() { // Status bar color - if (this.props.statusBarColor === "black") { - StatusBarIOS.setStyle(0); - } else { - StatusBarIOS.setStyle(1); + if (StatusBarIOS) { + if (this.props.statusBarColor === "black") { + StatusBarIOS.setStyle(0); + } else { + StatusBarIOS.setStyle(1); + } } var navigationBar = @@ -156,4 +158,4 @@ var styles = StyleSheet.create({ }); -module.exports = Router; \ No newline at end of file +module.exports = Router;