@furkot/directions 2.0.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/service/util.js +4 -2
- package/package.json +1 -1
package/lib/service/util.js
CHANGED
|
@@ -106,6 +106,7 @@ function collateResults(results, query) {
|
|
|
106
106
|
|
|
107
107
|
function withTimeout(promise, millis, signal) {
|
|
108
108
|
let id;
|
|
109
|
+
let resolve;
|
|
109
110
|
let reject;
|
|
110
111
|
|
|
111
112
|
signal?.addEventListener('abort', onabort);
|
|
@@ -120,10 +121,11 @@ function withTimeout(promise, millis, signal) {
|
|
|
120
121
|
reject(signal.reason);
|
|
121
122
|
}
|
|
122
123
|
|
|
123
|
-
function timeoutPromise(
|
|
124
|
+
function timeoutPromise(_resolve, _reject) {
|
|
125
|
+
resolve = _resolve;
|
|
124
126
|
reject = _reject;
|
|
125
127
|
id = setTimeout(
|
|
126
|
-
() =>
|
|
128
|
+
() => resolve(),
|
|
127
129
|
millis
|
|
128
130
|
);
|
|
129
131
|
}
|