Skip to content

Commit

Permalink
Improved condition for readability
Browse files Browse the repository at this point in the history
Thank you @toufik-airane for the tip ;)
  • Loading branch information
ferretwithaberet committed Apr 10, 2020
1 parent 7a94c4f commit ded18ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/vizion.js
Expand Up @@ -45,7 +45,7 @@ vizion.revertTo = function(argv, cb) {
var revision = (argv.revision) ? argv.revision : false;
var _folder = (argv.folder != undefined) ? argv.folder : '.';

if (!revision || !/^[A-Fa-f0-9]+$/.test(revision)) return cb({msg: 'Cannot revert to an invalid commit revision', path: _folder});
if (!(revision && /^[A-Fa-f0-9]+$/.test(revision))) return cb({msg: 'Cannot revert to an invalid commit revision', path: _folder});

identify(_folder, function(type, folder) {
if (ALL[type])
Expand Down

0 comments on commit ded18ca

Please sign in to comment.