Skip to content
This repository has been archived by the owner on Sep 15, 2021. It is now read-only.

Commit

Permalink
Correctly obtain named Buffer export from "buffer" built-in.
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamn committed May 8, 2018
1 parent 5e403de commit d88681f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit d88681f

Please sign in to comment.