Skip to content

Commit 4c271ae

Browse files
committed
Merge branch 'development' into fix/DX-1333-duplicate-block
2 parents fc92169 + b106ee0 commit 4c271ae

1 file changed

Lines changed: 1 addition & 12 deletions

File tree

src/lib/tsgen/factory.ts

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ export default function (userOptions: TSGenOptions) {
243243
function visit_content_type(
244244
contentType: ContentstackTypes.ContentType | ContentstackTypes.GlobalField
245245
) {
246+
modularBlockInterfaces.clear();
246247
const contentTypeInterface = [
247248
options.docgen.interface(contentType.description),
248249
define_interface(contentType, options.systemFields),
@@ -257,18 +258,6 @@ export default function (userOptions: TSGenOptions) {
257258

258259
return [...modularBlockInterfaces, contentTypeInterface].join('\n\n');
259260
}
260-
261-
function visit_modular_block(
262-
field: ContentstackTypes.Field,
263-
block: ContentstackTypes.Block
264-
) {
265-
return (
266-
'{' +
267-
[block.uid + ':', block.reference_to ? name_type(block.reference_to as string) + ';' : '{' + visit_fields(block.schema || []) + '};'].join(' ') +
268-
visit_block_names(field, block) +
269-
'}'
270-
)
271-
}
272261

273262
function type_modular_blocks(field: ContentstackTypes.Field): string {
274263
const blockInterfaceName = name_type(field.uid);

0 commit comments

Comments
 (0)