diff --git a/src/helpers/DiffHelpers.ts b/src/helpers/DiffHelpers.ts index 48040d9..d30108c 100644 --- a/src/helpers/DiffHelpers.ts +++ b/src/helpers/DiffHelpers.ts @@ -102,7 +102,7 @@ export function formatDiffOutput( export function getDocumentMajorVersion(document: any): string { const asyncapiVersion: string = document.asyncapi; - return asyncapiVersion.split('.')[0] as string; + return asyncapiVersion.split('.')[0]; } export function incompatibleDocuments( diff --git a/src/main.ts b/src/main.ts index 35ac67b..7b00cad 100644 --- a/src/main.ts +++ b/src/main.ts @@ -50,7 +50,7 @@ export function diff( const diffOutput = generateDiff(firstDocument, secondDocument); const output = categorizeChanges(standard as OverrideStandard, diffOutput); return new AsyncAPIDiff(JSON.stringify(output), { - outputType: config.outputType || 'json', - markdownSubtype: config.markdownSubtype || 'json', + outputType: config.outputType ?? 'json', + markdownSubtype: config.markdownSubtype ?? 'json', }); }