@vercel/functions 1.0.0 → 1.0.1

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.
Files changed (2) hide show
  1. package/index.js +1 -9
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  export const waitUntil = promise => {
4
4
  if (
5
- promise instanceof Promise === false ||
6
5
  promise === null ||
7
6
  typeof promise !== 'object' ||
8
7
  typeof promise.then !== 'function'
@@ -13,12 +12,5 @@ export const waitUntil = promise => {
13
12
  }
14
13
 
15
14
  const ctx = globalThis[Symbol.for('@vercel/request-context')]?.get?.() ?? {};
16
-
17
- if (!ctx.waitUntil) {
18
- throw new Error(
19
- 'failed to get waitUntil function for this request context'
20
- );
21
- }
22
-
23
- ctx.waitUntil(promise);
15
+ ctx.waitUntil?.(promise);
24
16
  };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@vercel/functions",
3
3
  "description": "Runtime functions to be used with your Vercel Functions",
4
4
  "homepage": "https://vercel.com",
5
- "version": "1.0.0",
5
+ "version": "1.0.1",
6
6
  "types": "index.d.ts",
7
7
  "main": "index.js",
8
8
  "repository": {