From bbe20dbe52c17a728878e64526810dfc98d19f1b Mon Sep 17 00:00:00 2001 From: Julian Paas Date: Tue, 4 Dec 2018 11:40:34 -0500 Subject: [PATCH] fix: only pass accessibility label if it is a string. fixes #36 (#38) --- packages/drawer/src/views/DrawerNavigatorItems.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/drawer/src/views/DrawerNavigatorItems.js b/packages/drawer/src/views/DrawerNavigatorItems.js index aebca734fd927b..6f19ea3dcf295f 100644 --- a/packages/drawer/src/views/DrawerNavigatorItems.js +++ b/packages/drawer/src/views/DrawerNavigatorItems.js @@ -34,12 +34,13 @@ const DrawerNavigatorItems = ({ const scene = { route, index, focused, tintColor: color }; const icon = renderIcon(scene); const label = getLabel(scene); + const accessibilityLabel = typeof label === 'string' ? label : undefined; const extraLabelStyle = focused ? activeLabelStyle : inactiveLabelStyle; return ( { onItemPress({ route, focused }); }}