Skip to content

Commit

Permalink
Catch error when deleting unselected calendars.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Jun 16, 2014
1 parent 60c1ab3 commit 06a365f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions kronolith/js/kronolith.js
Expand Up @@ -1257,10 +1257,13 @@ KronolithCore = {
*/
deleteCalendarLegend: function(type, id)
{
$('kronolith-legend').select('span').find(function(span) {
var legend = $('kronolith-legend').select('span').find(function(span) {
return span.retrieve('calendarclass') == type &&
span.retrieve('calendar') == id;
}).remove();
});
if (legend) {
legend.remove();
}
},

/**
Expand Down

0 comments on commit 06a365f

Please sign in to comment.