Skip to content

Commit 0303942

Browse files
committed
Merge pull request #4042 from littledice/master
fix(core): GridRenderContainer.js registerViewportAdjuster bug fix
2 parents ebfdede + 724883f commit 0303942

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/js/core/factories/GridRenderContainer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,10 @@ angular.module('ui.grid')
174174
* @description Removes an adjuster, should be used when your element is destroyed
175175
* @param {function} func the adjuster function we want to remove
176176
*/
177-
GridRenderContainer.prototype.removeViewportAdjuster = function registerViewportAdjuster(func) {
177+
GridRenderContainer.prototype.removeViewportAdjuster = function removeViewportAdjuster(func) {
178178
var idx = this.viewportAdjusters.indexOf(func);
179179

180-
if (typeof(idx) !== 'undefined' && idx !== undefined) {
180+
if (idx > -1) {
181181
this.viewportAdjusters.splice(idx, 1);
182182
}
183183
};

0 commit comments

Comments
 (0)