Skip to content

Commit

Permalink
make test for Source.buffer more strict
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed Jan 17, 2019
1 parent aaf85db commit 6e383cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ class Compiler extends Tapable {
// get the binary (Buffer) content from the Source
/** @type {Buffer} */
let content;
if (source.buffer) {
if (typeof source.buffer === "function") {
content = source.buffer();
} else {
const bufferOrString = source.source();
Expand Down

0 comments on commit 6e383cf

Please # to comment.