From 4169a9ba4f8589dfd45176f704ac940225549eb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Isager=20Dalsgar=C3=B0?= Date: Wed, 2 Oct 2024 11:08:30 +0200 Subject: [PATCH] Formatting --- src/globals.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/globals.js b/src/globals.js index 9abea2b6..7742c675 100644 --- a/src/globals.js +++ b/src/globals.js @@ -12,14 +12,15 @@ */ const resolved = Promise.resolve() -const crashError = err => setImmediate(() => { throw err }) + +const crash = err => setImmediate(() => { throw err }) global.queueMicrotask = function queueMicrotask (fn) { resolved .then(fn) // Make sure that exceptions are reported as normal uncaughts, not promise // rejections. - .catch(crashError) + .catch(crash) } /**