Skip to content

Commit

Permalink
fix: don't pass empty object to integrations constructor (#387)
Browse files Browse the repository at this point in the history
  • Loading branch information
rchl authored Feb 2, 2022
1 parent 7c0e699 commit b4b9415
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/plugin.client.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default function (ctx, inject) {
: `${key}:${serialize(option)}`
)
return `new ${name}({${integrationOptions.join(',')}})`
return `new ${name}(${integrationOptions.length ? '{' + integrationOptions.join(',') + '}' : ''})`
}).join(',\n ')%>
]
<% if (options.tracing) { %>
Expand Down
2 changes: 1 addition & 1 deletion lib/plugin.lazy.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ async function loadSentry (ctx, inject) {
: `${key}:${serialize(option)}`
)

return `new ${name}({${integrationOptions.join(',')}})`
return `new ${name}(${integrationOptions.length ? '{' + integrationOptions.join(',') + '}' : ''})`
}).join(',\n ')%>
]
/* eslint-enable object-curly-spacing, quote-props, quotes, key-spacing, comma-spacing */
Expand Down

0 comments on commit b4b9415

Please sign in to comment.