Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
fix(gridlist): Prevents media from being unwatched immediately
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Hyndman authored and ThomasBurleson committed Feb 12, 2015
1 parent 6ffc533 commit a410421
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/gridList/gridList.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ function GridListDirective($interpolate, $mdConstant, $mdGridLayout, $mdMedia, $

var invalidateLayout = angular.bind(ctrl, ctrl.invalidateLayout),
unwatchAttrs = watchMedia();
scope.$on('$destroy', unwatchMedia());
scope.$on('$destroy', unwatchMedia);

/**
* Watches for changes in media, invalidating layout as necessary.
Expand Down

0 comments on commit a410421

Please sign in to comment.