Skip to content

Commit

Permalink
calendar/CalendarEventPopover: fix bug where editing an event but the…
Browse files Browse the repository at this point in the history
…n closing the modal could result in the event changing anyways

pass the event modal a copy of the event object so that it can't mutate the original
  • Loading branch information
thatoddmailbox committed Aug 22, 2023
1 parent 50adf48 commit 2b2e9ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/calendar/CalendarEventPopover.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import HomeworkName from "ui/HomeworkName.jsx";

export default class CalendarEventPopover extends Component {
edit() {
var item = this.props.item;
const item = Object.assign({}, this.props.item);
item.type = this.props.type;
this.props.openModal("calendarEvent", item);
}
Expand Down

0 comments on commit 2b2e9ab

Please sign in to comment.