Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ matrix:
- yarn codecov

- language: objective-c
if: tag IS present
osx_image: xcode9.2
script: .travis/deploy.sh
after_success:
Expand Down
2 changes: 1 addition & 1 deletion scripts/after_prepare.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ module.exports = function(ctx) {
});
const releaseSentry = `
<script>
(function(w){var i=w.sentryRelease=w.sentryRelease||{};i.id='${release}';})(window);
(function(w){var i=w.SENTRY_RELEASE=w.SENTRY_RELEASE||{};i.id='${release}';})(this);
</script>
<!-- sentry-cordova -->`;
const replaceWith = `<head>${releaseSentry}`;
Expand Down
8 changes: 4 additions & 4 deletions src/js/SentryCordova.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,10 @@ export class SentryCordova implements IAdapter {
}

private tryToSetSentryRelease() {
if (window.sentryRelease !== undefined && window.sentryRelease.id !== undefined) {
this.setRelease(window.sentryRelease.id);
this.browser.getRaven().setRelease(window.sentryRelease.id);
this.client.log('received release from w.sentryRelease');
if (window.SENTRY_RELEASE !== undefined && window.SENTRY_RELEASE.id !== undefined) {
this.setRelease(window.SENTRY_RELEASE.id);
this.browser.getRaven().setRelease(window.SENTRY_RELEASE.id);
this.client.log('received release from window.SENTRY_RELEASE');
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/js/__tests__/SentryCordova.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function callDeviceReady() {
beforeEach(() => {
jest.resetAllMocks();
(window as any).Cordova = {};
(window as any).sentryRelease = {};
(window as any).SENTRY_RELEASE = {};
disableRavenInstrument();
});

Expand Down Expand Up @@ -168,8 +168,8 @@ describe('SentryCordova', () => {

test('Call setRelease from window', async done => {
expect.assertions(4);
(window as any).sentryRelease = {};
(window as any).sentryRelease.id = 'abc';
(window as any).SENTRY_RELEASE = {};
(window as any).SENTRY_RELEASE.id = 'abc';

callDeviceReady();

Expand Down