From 31ad6f168b839f80b8f17ed4cafba983a88aba3b Mon Sep 17 00:00:00 2001 From: Vladimir Pasquier Date: Mon, 6 Jun 2016 16:42:48 -0400 Subject: [PATCH] 790: Avoid rightButtonImage or rightTitle warnings when set to null --- src/NavBar.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/NavBar.js b/src/NavBar.js index 1629ea908..4ba60d66b 100644 --- a/src/NavBar.js +++ b/src/NavBar.js @@ -242,7 +242,8 @@ class NavBar extends React.Component { ); } - if ((!!state.onRight ^ !!(state.rightTitle || state.rightButtonImage))) { + if ((!!state.onRight ^ !!(typeof(state.rightTitle) !== 'undefined' + || typeof(state.rightButtonImage) !== 'undefined'))) { console.warn( `Both onRight and rightTitle/rightButtonImage must be specified for the scene: ${state.name}`