From 4489fa771464bcb49b57149760e9cc4131e8077e Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Thu, 2 Feb 2023 12:39:09 -0800 Subject: [PATCH] Revert "fix: error should be thrown (#1817)" (#1864) This reverts commit e7a34897a122342485468999a507626f1ea91507. --- src/root.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/root.js b/src/root.js index 6067ca69c..df6f11fa6 100644 --- a/src/root.js +++ b/src/root.js @@ -98,10 +98,10 @@ Root.prototype.load = function load(filename, options, callback) { /* istanbul ignore if */ if (!callback) return; - if (sync) - throw err; var cb = callback; callback = null; + if (sync) + throw err; cb(err, root); }