Calling get_formatters() returns empty table if load_associations_async() isn't done yet
TungstnBallon opened this issue · 2 comments
TungstnBallon commented
Hi, thank you for this really useful plugin.
I did find a small bug: If load_associations_async
is not done by the time get_formatters
is called, you get an empty table, which is probably due to cached_associations
not being set yet.
I worked around this by creating a blocking variant load_associations
. IMHO it would be nice to let get_formatters
block until a result is available (no idea how to do that), or to just add a configuration option.
frostplexx commented
Thank you for your feedback! I've pushed an updated to a new branch called fix_async where it waits for the cached_associations
to load before it returns anything. Could you check if that solves your issues?
TungstnBallon commented
Yes! Thank you!