Open mattbryson opened 12 years ago
Well heck, I'd been going round in circles trying to figure out why I wasn't getting any query results back - until I stumbled across this issue!
I was debugging where for awhile before stumbling on this issue as well. +1 to get it fixed in master!
@fisch0920, I believe that code was put in the trunk April 24, 2013.
Yep; you're right. I think the real issue here is that the files linked off of http://brian.io/lawnchair/ are way outdated and don't include this fix.
The Query plugin uses an Async method to lookup data, but assumes its Sync, so the
where
query returns (and executes callback) before it has actually looked-up any data.To fix, I moved the setting of
this.__results
into the callback of theall
lookup, and trigger thewhere
callback there.However, the drawback is that chaining (indicated in the docs) is not possible.