Skip to content

Commit 48608a0

Browse files
committed
feat(gatsby): Remove Sentry from window
1 parent 14b7962 commit 48608a0

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

packages/gatsby/gatsby-browser.js

+3-5
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@ exports.onClientEntry = function (_, pluginParams) {
66
const areOptionsDefined = areSentryOptionsDefined(pluginParams);
77

88
if (isIntialized) {
9-
window.Sentry = Sentry; // For backwards compatibility
109
if (areOptionsDefined) {
1110
console.warn(
1211
'Sentry Logger [Warn]: The SDK was initialized in the Sentry config file, but options were found in the Gatsby config. ' +
13-
'These have been ignored, merge them to the Sentry config if you want to use them.\n' +
14-
'Learn more about the Gatsby SDK on https://docs.sentry.io/platforms/javascript/guides/gatsby/',
12+
'These have been ignored, merge them to the Sentry config if you want to use them.\n' +
13+
'Learn more about the Gatsby SDK on https://docs.sentry.io/platforms/javascript/guides/gatsby/',
1514
);
1615
}
1716
return;
@@ -20,7 +19,7 @@ exports.onClientEntry = function (_, pluginParams) {
2019
if (!areOptionsDefined) {
2120
console.error(
2221
'Sentry Logger [Error]: No config for the Gatsby SDK was found.\n' +
23-
'Learn how to configure it on https://docs.sentry.io/platforms/javascript/guides/gatsby/',
22+
'Learn how to configure it on https://docs.sentry.io/platforms/javascript/guides/gatsby/',
2423
);
2524
return;
2625
}
@@ -32,7 +31,6 @@ exports.onClientEntry = function (_, pluginParams) {
3231
dsn: __SENTRY_DSN__,
3332
...pluginParams,
3433
});
35-
window.Sentry = Sentry; // For backwards compatibility
3634
};
3735

3836
function isSentryInitialized() {

0 commit comments

Comments
 (0)