Skip to content

Commit

Permalink
streamlines unnecessary promise check with Promise.resolve(...)
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Cowden committed Jan 31, 2017
1 parent 4a49dbf commit c8253bc
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/pluto.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@ function pluto() {

function createInstanceResolver(instance) {
return function () {
if (isPromise(instance)) {
return instance
} else {
return Promise.resolve(instance)
}
return Promise.resolve(instance)
}
}

Expand Down

0 comments on commit c8253bc

Please sign in to comment.