From 63a1f0f0dd95c42fdab2e2e2aa789393c7b1e697 Mon Sep 17 00:00:00 2001 From: Christine Abernathy Date: Fri, 24 Jun 2016 10:01:09 -0700 Subject: [PATCH] Fix errors related to typehint when generating docs Summary: After pulling in AsyncStorage doc changes, getting typehint errors when running docs. This fixes that issue. **Test plan (required)** Opened http://localhost:8079/react-native/index.html Clicked around. No errors. Also successfully ran: ``` node server/generate.js ``` Closes https://github.com/facebook/react-native/pull/8412 Differential Revision: D3482007 Pulled By: JoelMarcey fbshipit-source-id: 7b0da2b2b38fd1f1bdec1b7c810ee70c536dd2bb --- website/server/extractDocs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/server/extractDocs.js b/website/server/extractDocs.js index 6407a539532568..f78aef2eedde57 100644 --- a/website/server/extractDocs.js +++ b/website/server/extractDocs.js @@ -377,7 +377,7 @@ function getTypehint(typehint) { try { var typehint = JSON.parse(typehint); } catch (e) { - return typehint.split('|').map(type => type.trim()); + return typehint.toString().split('|').map(type => type.trim()); } return getTypehintRec(typehint); }