diff --git a/lib/util.js b/lib/util.js index 6128c36a98..2417392a2d 100644 --- a/lib/util.js +++ b/lib/util.js @@ -231,10 +231,10 @@ function ensureDebugIsInitialized() { function inspectPromise(p) { - ensureDebugIsInitialized(); // Only create a mirror if the object is a Promise. if (!binding.isPromise(p)) return null; + ensureDebugIsInitialized(); const mirror = Debug.MakeMirror(p, true); return {status: mirror.status(), value: mirror.promiseValue().value_}; }