Skip to content

Commit

Permalink
fix: onWidthEvent error
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonella Sgarlatta committed Jun 2, 2021
1 parent 093acd1 commit 4faebe4
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions app/assets/javascripts/directives/views/panelResizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -256,7 +253,7 @@ class PanelResizerCtrl implements PanelResizerScope {
}

handleWidthEvent(event?: MouseEvent) {
if (this.onWidthEvent) {
if (this.onWidthEvent && this.onWidthEvent()) {
this.onWidthEvent()();
}
let x;
Expand Down

0 comments on commit 4faebe4

Please sign in to comment.