From 1fbf636dd98a712b517c9e087573153b19a309fc Mon Sep 17 00:00:00 2001 From: Basil Crow Date: Tue, 30 Jul 2024 15:03:11 -0700 Subject: [PATCH] Simplify JSON parsing (#2567) --- blueocean-rest-impl/src/main/webapp/scripts/analytics.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/blueocean-rest-impl/src/main/webapp/scripts/analytics.js b/blueocean-rest-impl/src/main/webapp/scripts/analytics.js index 1ef6e629e5..84a550dea7 100644 --- a/blueocean-rest-impl/src/main/webapp/scripts/analytics.js +++ b/blueocean-rest-impl/src/main/webapp/scripts/analytics.js @@ -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');