Skip to content

Commit 6e383cf

Browse files
committed
make test for Source.buffer more strict
1 parent aaf85db commit 6e383cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Compiler.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ class Compiler extends Tapable {
366366
// get the binary (Buffer) content from the Source
367367
/** @type {Buffer} */
368368
let content;
369-
if (source.buffer) {
369+
if (typeof source.buffer === "function") {
370370
content = source.buffer();
371371
} else {
372372
const bufferOrString = source.source();

0 commit comments

Comments
 (0)