Skip to content

Commit 59366c1

Browse files
vmlf01mgcrea
authored andcommitted
fix(affix): revert to $affix reference in $onResize event handler
The affix $onResize event handler was throwing an error when using 'this' to refer to $affix
1 parent bf35415 commit 59366c1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/affix/affix.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ angular.module('mgcrea.ngStrap.affix', ['mgcrea.ngStrap.helpers.dimensions', 'mg
129129
};
130130

131131
$affix.$onResize = function() {
132-
this.$parseOffsets();
133-
this.checkPosition();
132+
$affix.$parseOffsets();
133+
$affix.checkPosition();
134134
};
135135
$affix.$debouncedOnResize = debounce($affix.$onResize, 50);
136136

0 commit comments

Comments
 (0)