Skip to content

Commit

Permalink
make sure to remove events when the array changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesdixon committed Oct 15, 2017
1 parent 5e2fe5b commit f20bc14
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion addon/components/full-calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,9 @@ export default Ember.Component.extend(InvokeActionMixin, {
const fc = this.$();
const events = this.get('events');

fc.fullCalendar('removeEvents');

if (events) {
fc.fullCalendar('removeEvents');
fc.fullCalendar('addEventSource', this.get('events'));
}
}),
Expand Down

0 comments on commit f20bc14

Please sign in to comment.