Skip to content

Commit

Permalink
fix(bundler): check for string before formatting (#19791)
Browse files Browse the repository at this point in the history
  • Loading branch information
rarkins committed Jan 11, 2023
1 parent 1991b7f commit aa4e167
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/modules/manager/bundler/extract.ts
@@ -1,3 +1,4 @@
import is from '@sindresorhus/is';
import { logger } from '../../../logger';
import { readLocalFile } from '../../../util/fs';
import { newlineRegex, regEx } from '../../../util/regex';
Expand Down Expand Up @@ -159,7 +160,7 @@ export async function extractPackageFile(
while (lineNumber < lines.length && ifLine !== 'end') {
lineNumber += 1;
ifLine = lines[lineNumber];
if (ifLine !== 'end') {
if (is.string(ifLine) && ifLine !== 'end') {
ifContent += formatContent(ifLine);
}
}
Expand Down

0 comments on commit aa4e167

Please sign in to comment.