From ec582d6e466986ca813aa2d0837e28151a07035b Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 20 Mar 2018 15:28:25 +0000 Subject: Small doc fixes: remove duplicate types and add function array --- packages/react-docs/src/utils/doxity_utils.ts | 1 + packages/react-docs/src/utils/typedoc_utils.ts | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'packages/react-docs/src/utils') diff --git a/packages/react-docs/src/utils/doxity_utils.ts b/packages/react-docs/src/utils/doxity_utils.ts index 26dea6966..1b91690e0 100644 --- a/packages/react-docs/src/utils/doxity_utils.ts +++ b/packages/react-docs/src/utils/doxity_utils.ts @@ -116,6 +116,7 @@ export const doxityUtils = { methods, properties, types: [], + functions: [], events, }; docAgnosticFormat[contractName] = docSection; diff --git a/packages/react-docs/src/utils/typedoc_utils.ts b/packages/react-docs/src/utils/typedoc_utils.ts index 4c7617234..269bf7873 100644 --- a/packages/react-docs/src/utils/typedoc_utils.ts +++ b/packages/react-docs/src/utils/typedoc_utils.ts @@ -170,7 +170,11 @@ export const typeDocUtils = { sectionName, docsInfo.id, ); - docSection.types.push(customType); + const seenTypeNames = _.map(docSection.types, t => t.name); + const isUnseen = !_.includes(seenTypeNames, customType.name); + if (isUnseen) { + docSection.types.push(customType); + } } break; -- cgit v1.2.3