Skip to content

Commit

Permalink
Fix #68: PopStateEvent.state may be null
Browse files Browse the repository at this point in the history
  • Loading branch information
cmb69 committed May 24, 2021
1 parent 8ee4bd7 commit 3305902
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/calendar.min.js
Expand Up @@ -72,7 +72,7 @@ class CalendarWidget {
* @param {PopStateEvent} event
*/
onPopState(event) {
if ("calendar_url" in event.state) {
if (event.state && "calendar_url" in event.state) {
this.retrieveCalendar(event.state.calendar_url, true);
}
}
Expand Down

0 comments on commit 3305902

Please sign in to comment.