Fixed bug for full-day item spanning more than one day
When calendar was in week-mode and user switched to the next week
_updateTopGrid tried to remove a component which has already been
removed. This bug is now fixed.
270250
diff --git a/eclipse-scout-core/src/calendar/Calendar.js b/eclipse-scout-core/src/calendar/Calendar.js
index 029e95c..ff02e2b 100644
--- a/eclipse-scout-core/src/calendar/Calendar.js
+++ b/eclipse-scout-core/src/calendar/Calendar.js
@@ -818,8 +818,11 @@
}
_updateTopGrid() {
- $('.calendar-component', this.$topGrid).each(function($index, part) {
- $(part).data('component').remove();
+ $('.calendar-component', this.$topGrid).each((index, part) => {
+ let component = $(part).data('component');
+ if (component) {
+ component.remove();
+ }
});
var allDayComponents = this.components.filter(component => component.fullDay);
// first remove all components and add them from scratch