Skip to content

Commit

Permalink
Bind plugin function to plugin itself in findReplacementFunc() (#2535)
Browse files Browse the repository at this point in the history
This is already implicitly done for the regular plugin path
(`applyPlugins`).
  • Loading branch information
TimothyGu committed Sep 10, 2016
1 parent c649b56 commit b876a89
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function findReplacementFunc(plugins, name) {
if (eligiblePlugins.length > 1) {
throw new Error('Two or more plugins all implement ' + name + ' method.');
} else if (eligiblePlugins.length) {
return eligiblePlugins[0][name];
return eligiblePlugins[0][name].bind(eligiblePlugins[0]);
}
return null;
}
Expand Down

0 comments on commit b876a89

Please sign in to comment.