Skip to content
This repository has been archived by the owner on Jul 30, 2018. It is now read-only.

Commit

Permalink
bind function properties correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
agubler committed Jul 26, 2017
1 parent fd5af2e commit a25e175
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/WidgetBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,8 @@ export class WidgetBase<P = WidgetProperties, C extends DNode = DNode> extends E
let { boundFunc, scope } = bindInfo;

if (boundFunc === undefined || scope !== bind) {
this._bindFunctionPropertyMap.set(property, { boundFunc: property.bind(bind), scope: bind });
boundFunc = property.bind(bind) as (...args: any[]) => any;
this._bindFunctionPropertyMap.set(property, { boundFunc, scope: bind });
}
return boundFunc;
}
Expand Down

0 comments on commit a25e175

Please sign in to comment.