diff options
author | Fabio Berger <me@fabioberger.com> | 2018-07-20 02:45:20 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-07-20 02:45:20 +0800 |
commit | e53e2ac31befb850045430ff610e1cee7c446de7 (patch) | |
tree | 2479b5b8b5f218829fe690d4c65b2142f222e638 /packages/website/ts | |
parent | b72857cd8b8a391b340d2f09636b140bcfd73a31 (diff) | |
download | dexon-sol-tools-e53e2ac31befb850045430ff610e1cee7c446de7.tar dexon-sol-tools-e53e2ac31befb850045430ff610e1cee7c446de7.tar.gz dexon-sol-tools-e53e2ac31befb850045430ff610e1cee7c446de7.tar.bz2 dexon-sol-tools-e53e2ac31befb850045430ff610e1cee7c446de7.tar.lz dexon-sol-tools-e53e2ac31befb850045430ff610e1cee7c446de7.tar.xz dexon-sol-tools-e53e2ac31befb850045430ff610e1cee7c446de7.tar.zst dexon-sol-tools-e53e2ac31befb850045430ff610e1cee7c446de7.zip |
Fix version dropdown so it also renders RC versions properly
Diffstat (limited to 'packages/website/ts')
-rw-r--r-- | packages/website/ts/utils/doc_utils.ts | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/packages/website/ts/utils/doc_utils.ts b/packages/website/ts/utils/doc_utils.ts index 1627b9b0c..b9084bba7 100644 --- a/packages/website/ts/utils/doc_utils.ts +++ b/packages/website/ts/utils/doc_utils.ts @@ -1,6 +1,5 @@ import { DoxityDocObj, TypeDocNode } from '@0xproject/react-docs'; import { fetchAsync, logUtils } from '@0xproject/utils'; -import findVersions = require('find-versions'); import * as _ from 'lodash'; import { S3FileObject, VersionToFilePath } from 'ts/types'; import convert = require('xml-js'); @@ -10,7 +9,7 @@ export const docUtils = { const versionFilePaths = await docUtils.getVersionFileNamesAsync(s3DocJsonRoot, folderName); const versionToFilePath: VersionToFilePath = {}; _.each(versionFilePaths, filePath => { - const [version] = findVersions(filePath); + const version = filePath.split('/v')[1].replace('.json', ''); versionToFilePath[version] = filePath; }); return versionToFilePath; |