Skip to content

Commit

Permalink
Callback validation into checkNewVersion (#117)
Browse files Browse the repository at this point in the history
When app version do not correspond to Semantic Versioning the function semver.gt(...) throw a exception, so, I put the callback into a TryCatch as the others. Now, the developer can know if the version is wrong formatted.
  • Loading branch information
edelciomolina authored May 17, 2023
1 parent ed0036d commit c18c117
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/updater.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,12 @@
return cb(e)
}

cb(null, semver.gt(data.version, this.manifest.version), data);
try {
cb(null, semver.gt(data.version, this.manifest.version), data);
} catch (e) {
return cb(e)
}

}
};

Expand Down

0 comments on commit c18c117

Please sign in to comment.