@@ -13,19 +13,21 @@ export default class Event implements UiComponent {
1313 }
1414
1515 appendTo ( entry : HTMLElement | null ) : void {
16- let secondsDiff = moment ( ) . diff ( this . _event . datetime , 'seconds' ) ;
16+ const secondsDiff = moment ( ) . diff ( this . _event . datetime , 'seconds' ) ;
17+ const timestamp = this . _event . datetime . utc ( ) . unix ( ) . toString ( ) ;
1718
1819 if ( this . isCancelled ( ) ) {
19- new CancelledEvent ( this . _event ) . appendTo ( entry ) ;
20+ new CancelledEvent ( this . _event , timestamp ) . appendTo ( entry ) ;
2021 } else if ( 0 <= secondsDiff && secondsDiff < 4 * 60 * 60 ) {
21- new CurrentEvent ( this . _event ) . appendTo ( entry ) ;
22+ new CurrentEvent ( this . _event , timestamp ) . appendTo ( entry ) ;
2223 } else if ( secondsDiff >= 4 * 60 * 60 ) {
23- new PastEvent ( this . _event ) . appendTo ( entry ) ;
24+ new PastEvent ( this . _event , timestamp ) . appendTo ( entry ) ;
2425 } else {
25- new FutureEvent ( this . _event ) . appendTo ( entry ) ;
26+ new FutureEvent ( this . _event , timestamp ) . appendTo ( entry ) ;
2627 }
2728
28- const hashId = "#_" + this . _event . datetime . utc ( ) . unix ( ) ;
29+ const hashId = "#_" + timestamp ;
30+
2931 if ( window . location . hash == hashId ) {
3032 window . location . hash = "" ;
3133 setTimeout ( ( ) => { window . location . hash = hashId ; } , 0 ) ;
0 commit comments