fix(resizing) Fixing handleResize on viewer loading
This commit is contained in:
1 parent
ec9c0d444d
commit
25646e3192
1 file changed
+3
-1
@@ -28,7 +28,9 @@ Template.imageControls.onRendered(() => {
|
|||||||
|
|
||||||
Template.imageControls.onDestroyed(() => {
|
Template.imageControls.onDestroyed(() => {
|
||||||
const instance = Template.instance();
|
const instance = Template.instance();
|
||||||
$(window).off('resize', instance.handleResize);
|
if (instance.handleResize) {
|
||||||
|
$(window).off('resize', instance.handleResize);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Template.imageControls.events({
|
Template.imageControls.events({
|
||||||
|
|||||||
Reference in new issue
Block a user