Skip to content

Commit b99d701

Browse files
authored
Merge pull request #103 from tsoding/102
(#102) Make an Event reactivate its own anchor
2 parents 8742db5 + 53b6500 commit b99d701

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ts/Event.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ export default class Event implements UiComponent {
2424
} else {
2525
new FutureEvent(this._event).appendTo(entry);
2626
}
27+
28+
const hashId = "#_" + this._event.datetime.utc().unix();
29+
if (window.location.hash == hashId) {
30+
window.location.hash = "";
31+
setTimeout(() => { window.location.hash = hashId; }, 0);
32+
}
2733
}
2834

2935
isCancelled(): boolean {

0 commit comments

Comments
 (0)