From 4faebe4ffd16850d1e5b9a61d56e383741f72b7d Mon Sep 17 00:00:00 2001 From: Antonella Sgarlatta Date: Wed, 2 Jun 2021 20:05:34 -0300 Subject: [PATCH] fix: onWidthEvent error --- app/assets/javascripts/directives/views/panelResizer.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/assets/javascripts/directives/views/panelResizer.ts b/app/assets/javascripts/directives/views/panelResizer.ts index 9b8c93451..791e3fcb9 100644 --- a/app/assets/javascripts/directives/views/panelResizer.ts +++ b/app/assets/javascripts/directives/views/panelResizer.ts @@ -189,9 +189,6 @@ class PanelResizerCtrl implements PanelResizerScope { addDoubleClickHandler() { this.resizerColumn.ondblclick = () => { this.$timeout(() => { - if (this.onWidthEvent) { - this.onWidthEvent()(); - } const preClickCollapseState = this.isCollapsed(); if (preClickCollapseState) { this.setWidth(this.widthBeforeLastDblClick || this.defaultWidth); @@ -256,7 +253,7 @@ class PanelResizerCtrl implements PanelResizerScope { } handleWidthEvent(event?: MouseEvent) { - if (this.onWidthEvent) { + if (this.onWidthEvent && this.onWidthEvent()) { this.onWidthEvent()(); } let x;