Skip to content

Commit ac0d611

Browse files
committed
fix: 🐛 don't try to access metadata build option when not provided
1 parent 18a7735 commit ac0d611

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## [Unreleased]
4+
5+
- Fixed an issue when build metadata option is not provided (#101)
6+
37
## [2.2.2] - 2025-07-03
48

59
- Ensure that we correctly pass the metadata the BugSnag CLI create build command (#100)

build-reporter-plugin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ class BugsnagBuildReporterPlugin {
6262
const optionalOpts = {
6363
autoAssignRelease: opts.build.autoAssignRelease,
6464
builderName: opts.build.builderName,
65-
metadata: Object.entries(opts.build.metadata)
65+
metadata: opts.build.metadata ? Object.entries(opts.build.metadata)
6666
.map(([key, value]) => `${key}=${value}`)
67-
.join(','),
67+
.join(',') : undefined,
6868
provider: opts.build.sourceControl.provider,
6969
repository: opts.build.sourceControl.repository,
7070
revision: opts.build.sourceControl.revision,

0 commit comments

Comments
 (0)