Skip to content

Commit

Permalink
Merge pull request #17 from lemonde/fix-call-lock-insteadof-refresh
Browse files Browse the repository at this point in the history
fix: call refresh instead of lock
  • Loading branch information
JBustin authored Mar 13, 2017
2 parents d2b9d26 + 5be31c8 commit 699b2b5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/locky.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ class Locky extends EventEmitter {
*/

refresh(resource, callback) {
if (!_.isFunction(callback)) return this.lockPromise(resource);
return this.lockPromise(resource).asCallback(callback);
if (!_.isFunction(callback)) return this.refreshPromise(resource);
return this.refreshPromise(resource).asCallback(callback);
}

refreshPromise(resource) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "locky",
"version": "2.2.0",
"version": "2.2.1",
"description": "User / resource locking system.",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 699b2b5

Please sign in to comment.