diff --git a/backend/src/services/alert/index.ts b/backend/src/services/alert/index.ts index 91d8f23f..395e95bb 100644 --- a/backend/src/services/alert/index.ts +++ b/backend/src/services/alert/index.ts @@ -457,7 +457,7 @@ export class AlertService { } else if (openApiSpec.extension === SpecExtension.YAML) { const map = new SourceMap() yaml.load(openApiSpec.spec, { listener: map.listen() }) - lineNumber = map.lookup(pathPointer).line + lineNumber = map.lookup(pathPointer)?.line if (lineNumber) { lineNumber -= 1 }