Skip to content

Commit

Permalink
docs: fix example of binding unbound method (#8754)
Browse files Browse the repository at this point in the history
Fix example of binding unbound method
  • Loading branch information
victma authored Mar 25, 2024
1 parent a08554a commit 990ec22
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/eslint-plugin/docs/rules/unbound-method.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ const { logBound } = instance;
logBound();

// .bind and lambdas will also add a correct scope
const dotBindLog = instance.logBound.bind(instance);
const innerLog = () => instance.logBound();
const dotBindLog = instance.logUnbound.bind(instance);
const innerLog = () => instance.logUnbound();

// arith.double explicitly declares that it does not refer to `this` internally
const arith = {
Expand Down

0 comments on commit 990ec22

Please sign in to comment.