@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.
@@ -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(_, _reject) {
124
+ function timeoutPromise(_resolve, _reject) {
125
+ resolve = _resolve;
124
126
  reject = _reject;
125
127
  id = setTimeout(
126
- () => reject(Error('timeout', { cause: Symbol.for('timeout') })),
128
+ () => resolve(),
127
129
  millis
128
130
  );
129
131
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@furkot/directions",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "Directions service for Furkot",
5
5
  "author": {
6
6
  "name": "Damian Krzeminski",