Skip to content

Commit

Permalink
Simplify JSON parsing (#2567)
Browse files Browse the repository at this point in the history
  • Loading branch information
basil authored Jul 30, 2024
1 parent d3539a2 commit 1fbf636
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions blueocean-rest-impl/src/main/webapp/scripts/analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ window.addEventListener('load', function() {
headers: crumb.wrap({
'Content-Type': 'application/json'
}),
// TODO simplify when Prototype.js is removed
body: Object.toJSON ? Object.toJSON(eventData) : JSON.stringify(eventData)
body: JSON.stringify(eventData)
}).then(function(rsp) {
if (!rsp.ok) {
console.error('Could not send pageview event');
Expand Down

0 comments on commit 1fbf636

Please sign in to comment.