Skip to content

Commit

Permalink
fix eslint error
Browse files Browse the repository at this point in the history
  • Loading branch information
Alanscut authored and ichernev committed Dec 23, 2023
1 parent 08084a8 commit 6ce18b1
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/lib/create/valid.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ import getParsingFlags from '../create/parsing-flags';
import some from '../utils/some';

export function isValid(m) {
var isNowValid = (m._d && !isNaN(m._d.getTime()));
var flags = null,
parsedParts = false,
isNowValid = (m._d && !isNaN(m._d.getTime()));
if (isNowValid) {
var flags = getParsingFlags(m),
parsedParts = some.call(flags.parsedDateParts, function (i) {
return i != null;
});
flags = getParsingFlags(m);
parsedParts = some.call(flags.parsedDateParts, function (i) {
return i != null;
});
isNowValid =
flags.overflow < 0 &&
!flags.empty &&
Expand Down

0 comments on commit 6ce18b1

Please sign in to comment.