From d88681f2b04a92f428fa3ebe92f8ce81202e5970 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Tue, 8 May 2018 12:12:55 -0400 Subject: [PATCH] Correctly obtain named Buffer export from "buffer" built-in. --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index bc65e30aa0..a961ff0882 100644 --- a/index.js +++ b/index.js @@ -33,7 +33,7 @@ if (typeof global.Buffer !== "function") { try { // Use (0, require)(...) to avoid registering a dependency on the // "buffer" stub, in case it is not otherwise bundled. - global.Buffer = (0, require)("buffer"); + global.Buffer = (0, require)("buffer").Buffer; } catch (ok) { // Failure to import "buffer" is fine as long as the Buffer global // variable is not used.