From 9bc1c215e3857d109fca2a073fd50799e0021cc8 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Sun, 10 May 2015 12:07:48 +0100 Subject: Search completion; fix synchronisation issue. --- lib/utils.coffee | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/utils.coffee') diff --git a/lib/utils.coffee b/lib/utils.coffee index a1ed23c2..1ff33300 100644 --- a/lib/utils.coffee +++ b/lib/utils.coffee @@ -274,14 +274,14 @@ class SimpleCache @rotate() # This is a simple class for the common case where we want to use some data value which may be immediately -# available, or for which we may have to wait. It implements the use-immediately-or-wait queue, and calls the -# function to fetch the data asynchronously. +# available, or for which we may have to wait. It implements a use-immediately-or-wait queue, and calls the +# fetch function to fetch the data asynchronously. class AsyncDataFetcher constructor: (fetch) -> @data = null @queue = [] - fetch (@data) => - Utils.nextTick => + Utils.nextTick => + fetch (@data) => callback @data for callback in @queue @queue = null -- cgit v1.2.3