Skip to content

Commit

Permalink
bind lexical this for this.update (#28357)
Browse files Browse the repository at this point in the history
  • Loading branch information
ycw authored May 13, 2024
1 parent db10722 commit 86a4d25
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions editor/js/libs/ui.three.js
Original file line number Diff line number Diff line change
Expand Up @@ -549,17 +549,15 @@ class UIPoints extends UISpan {
this.lastPointIdx = 0;
this.onChangeCallback = null;

// TODO Remove this bind() stuff

this.update = function () {
this.update = () => { // bind lexical this

if ( this.onChangeCallback !== null ) {

this.onChangeCallback();

}

}.bind( this );
};

}

Expand Down

0 comments on commit 86a4d25

Please sign in to comment.