Skip to content

Commit

Permalink
change console.error message
Browse files Browse the repository at this point in the history
  • Loading branch information
magicmatatjahu committed Jun 29, 2021
1 parent 78aeefb commit 24b9792
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ lib.convert = (asyncapi, version, options = {}) => {
const toVersion = conversionVersions.indexOf(version);

if (fromVersion === -1 || toVersion === -1) {
console.error(`Can't convert from ${parsed.asyncapi} to ${version}.`);
console.error(`Cannot convert from ${parsed.asyncapi} to ${version}.`);
return;
}
if (fromVersion > toVersion) {
console.error(`Cannot downgrade from ${parsed.asyncapi} to ${version}.`);
return;
}
if (fromVersion === toVersion) {
console.error(`Cannot downgrade from ${parsed.asyncapi} to ${version}.`);
console.error(`Cannot convert to this same version.`);
return;
}

Expand Down

0 comments on commit 24b9792

Please sign in to comment.