Skip to content

Commit

Permalink
Replace parseInt() with typeof check
Browse files Browse the repository at this point in the history
  • Loading branch information
fwouts committed Jun 15, 2023
1 parent d93fa14 commit e93547b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ignore.js
Expand Up @@ -59,7 +59,7 @@ const getIsIgnoredPredicate = (files, cwd) => {
const normalizeOptions = (options = {}) => ({
cwd: toPath(options.cwd) || process.cwd(),
suppressErrors: Boolean(options.suppressErrors),
deep: options.deep ? Number.parseInt(options.deep, 10) : Number.POSITIVE_INFINITY,
deep: typeof options.deep === 'number' ? options.deep : Number.POSITIVE_INFINITY,
});

export const isIgnoredByIgnoreFiles = async (patterns, options) => {
Expand Down

0 comments on commit e93547b

Please sign in to comment.