Skip to content

Commit

Permalink
fix yaml path pointer lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
NikhilShahi committed Oct 6, 2022
1 parent 46a460f commit ae21644
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/src/services/alert/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit ae21644

Please sign in to comment.