mirror of
https://github.com/sasjs/lint.git
synced 2025-12-10 17:34:36 +00:00
fix(*): add empty string fallback to trimComments
This commit is contained in:
@@ -2,7 +2,7 @@ export const trimComments = (
|
||||
statement: string,
|
||||
commentStarted: boolean = false
|
||||
): { statement: string; commentStarted: boolean } => {
|
||||
let trimmed = statement.trim()
|
||||
let trimmed = (statement || '').trim()
|
||||
|
||||
if (commentStarted || trimmed.startsWith('/*')) {
|
||||
const parts = trimmed.split('*/')
|
||||
|
||||
Reference in New Issue
Block a user