Skip to content

Commit

Permalink
MDL-71817 calendar: Use root node to find the target elements
Browse files Browse the repository at this point in the history
Instead of passing querying for the root element again by its ID
which changed in this issue, use the already existing root element
at the beginning of this Mustache JS code. It also makes maintenance
simpler in the future.
  • Loading branch information
junpataleta committed Jul 22, 2021
1 parent 68bd3a1 commit 68fa468
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion calendar/templates/month_detailed.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ require([
M.util.js_pending("month-detailed-{{uniqid}}-filterChanged");
// A filter value has been changed.
// Find all matching cells in the popover data, and hide them.
var target = $("#month-detailed-{{uniqid}}").find(CalendarSelectors.eventType[data.type]);
var target = root.find(CalendarSelectors.eventType[data.type]);
var transitionPromise = $.Deferred();
if (data.hidden) {
Expand Down

0 comments on commit 68fa468

Please sign in to comment.