Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 577e9ee

Browse files
committed
Fix method bindings
1 parent 067886f commit 577e9ee

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/CountlyAnalytics.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -666,11 +666,11 @@ export default class CountlyAnalytics {
666666
return window.innerWidth > window.innerHeight ? Orientation.Landscape : Orientation.Portrait;
667667
};
668668

669-
private reportOrientation() {
669+
private reportOrientation = () => {
670670
this.track<IOrientationEvent>("[CLY]_orientation", {
671671
mode: this.getOrientation(),
672672
});
673-
}
673+
};
674674

675675
private startTime() {
676676
if (!this.trackTime) {
@@ -754,7 +754,7 @@ export default class CountlyAnalytics {
754754
}
755755
}
756756

757-
private endSession() {
757+
private endSession = () => {
758758
if (this.sessionStarted) {
759759
window.removeEventListener("resize", this.reportOrientation)
760760

@@ -765,7 +765,7 @@ export default class CountlyAnalytics {
765765
});
766766
}
767767
this.sessionStarted = false;
768-
}
768+
};
769769

770770
private onVisibilityChange = () => {
771771
if (document.hidden) {

0 commit comments

Comments
 (0)