Skip to content

Commit abc40a6

Browse files
committed
update from master
2 parents 5419678 + ca093a6 commit abc40a6

File tree

5 files changed

+24
-6
lines changed

5 files changed

+24
-6
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
## Unreleased
22

33
* Add support for logging events to multiple Amplitude apps. **Note this is a major update, and may break backwards compatability.** See [Readme](https://github.com/amplitude/Amplitude-Javascript#300-update-and-logging-events-to-multiple-amplitude-apps) for details.
4+
* Fix bug where saveReferrer throws exception if sessionStorage is disabled.
5+
* Log messages with a try/catch to support IE 8.
46

57
## 2.9.0 (January 15, 2016)
68

amplitude.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,11 @@ var type = require('./type');
266266
var DEFAULT_OPTIONS = require('./options');
267267

268268
var log = function(s) {
269-
console.log('[Amplitude] ' + s);
269+
try {
270+
console.log('[Amplitude] ' + s);
271+
} catch (e) {
272+
// console logging not available
273+
}
270274
};
271275

272276
var DEFAULT_INSTANCE = '$default_instance';
@@ -2236,7 +2240,11 @@ var AMP_OP_SET_ONCE = '$setOnce';
22362240
var AMP_OP_UNSET = '$unset';
22372241

22382242
var log = function(s) {
2239-
console.log('[Amplitude] ' + s);
2243+
try {
2244+
console.log('[Amplitude] ' + s);
2245+
} catch (e) {
2246+
// console logging not available
2247+
}
22402248
};
22412249

22422250
var Identify = function() {

amplitude.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/amplitude-client.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ var type = require('./type');
1414
var DEFAULT_OPTIONS = require('./options');
1515

1616
var log = function(s) {
17-
console.log('[Amplitude] ' + s);
17+
try {
18+
console.log('[Amplitude] ' + s);
19+
} catch (e) {
20+
// console logging not available
21+
}
1822
};
1923

2024
var DEFAULT_INSTANCE = '$default_instance';

src/identify.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ var AMP_OP_SET_ONCE = '$setOnce';
1414
var AMP_OP_UNSET = '$unset';
1515

1616
var log = function(s) {
17-
console.log('[Amplitude] ' + s);
17+
try {
18+
console.log('[Amplitude] ' + s);
19+
} catch (e) {
20+
// console logging not available
21+
}
1822
};
1923

2024
var Identify = function() {

0 commit comments

Comments
 (0)