thinky icon indicating copy to clipboard operation
thinky copied to clipboard

Fixes a promise warning

Open lelandcope opened this issue 9 years ago • 1 comments

Fixes a promise warning because nothing is being returned.

Actual message: Warning: a promise was created in a handler but was not returned from it

Stack Trace

Warning: a promise was created in a handler but was not returned from it
  at process._tickDomainCallback (node.js:486:13)
  at process.wrappedFunction (/Users/leland/Sites/ListReports/portal/node_modules/newrelic/lib/transaction/tracer/index.js:250:51)
From previous event:
  at Promise.wrappedFunction [as _then] (/Users/leland/Sites/ListReports/portal/node_modules/newrelic/lib/transaction/tracer/index.js:225:51)
  at Model.tableReady (/Users/leland/Sites/ListReports/portal/node_modules/thinky/lib/model.js:215:34)
  at Function.Model.new (/Users/leland/Sites/ListReports/portal/node_modules/thinky/lib/model.js:167:11)
  at Thinky.createModel (/Users/leland/Sites/ListReports/portal/node_modules/thinky/lib/thinky.js:130:24)

lelandcope avatar Jun 09 '16 21:06 lelandcope

Hum, I'm not sure you are fixing the appropriate thing.

Thinky is still using bluebird 2.x, so it doesn't warn about this. There's also no promise created where you added a return null

neumino avatar Jun 11 '16 17:06 neumino