From 7830f56f9881ea1e228e925ce7532bb873dc1a53 Mon Sep 17 00:00:00 2001 From: Aayush Kumar Sahu Date: Wed, 11 Dec 2024 00:26:57 +0530 Subject: [PATCH] fix issues --- src/helpers/DiffHelpers.ts | 2 +- src/main.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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', }); }