diff options
author | Fabio Berger <me@fabioberger.com> | 2018-10-02 00:53:19 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-10-02 00:53:19 +0800 |
commit | dbbf04bc7d6072055911572b41afd2bf95e65c70 (patch) | |
tree | 7acf866f2c8aa8d30bb46b99b6d659d96aa2020f /packages/sol-doc/src/sol_doc.ts | |
parent | bad6761e13d5348eccdf8ae37e83b152740dbe45 (diff) | |
download | dexon-sol-tools-dbbf04bc7d6072055911572b41afd2bf95e65c70.tar dexon-sol-tools-dbbf04bc7d6072055911572b41afd2bf95e65c70.tar.gz dexon-sol-tools-dbbf04bc7d6072055911572b41afd2bf95e65c70.tar.bz2 dexon-sol-tools-dbbf04bc7d6072055911572b41afd2bf95e65c70.tar.lz dexon-sol-tools-dbbf04bc7d6072055911572b41afd2bf95e65c70.tar.xz dexon-sol-tools-dbbf04bc7d6072055911572b41afd2bf95e65c70.tar.zst dexon-sol-tools-dbbf04bc7d6072055911572b41afd2bf95e65c70.zip |
Fix bug in sol-doc
Diffstat (limited to 'packages/sol-doc/src/sol_doc.ts')
-rw-r--r-- | packages/sol-doc/src/sol_doc.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/sol-doc/src/sol_doc.ts b/packages/sol-doc/src/sol_doc.ts index 4b7cbe77c..eda767054 100644 --- a/packages/sol-doc/src/sol_doc.ts +++ b/packages/sol-doc/src/sol_doc.ts @@ -270,15 +270,15 @@ export class SolDoc { } return type; } - private _overwriteStructNames(customTypes: CustomType[], customTypeHashToName?: ObjectMap<string>): CustomType[] { - if (_.isUndefined(customTypeHashToName)) { + private _overwriteStructNames(customTypes: CustomType[]): CustomType[] { + if (_.isUndefined(this._customTypeHashToName)) { return customTypes; } const localCustomTypes = _.cloneDeep(customTypes); - _.each(localCustomTypes, customType => { + _.each(localCustomTypes, (customType, i) => { const hash = SolDoc._generateCustomTypeHash(customType); if (!_.isUndefined(this._customTypeHashToName) && !_.isUndefined(this._customTypeHashToName[hash])) { - customType.name = this._customTypeHashToName[hash]; + localCustomTypes[i].name = this._customTypeHashToName[hash]; } }); return localCustomTypes; |