codemodsquad / asyncify

Don't keep your promises 😉
MIT License
13 stars 6 forks source link

don't extract a new variable for .then that returns input unmodified #10

Open jedwards1211 opened 4 years ago

jedwards1211 commented 4 years ago

e.g. the following currently ends up creating instances0 etc

.then(instances => {
   if (options.runHooks) {
     return this.runHooks().then(() => instances)
   }
   return instances
})
.then(instances => {
  ...
})