mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Fix Buffer conversion logic in writeFile.
This commit is contained in:
@@ -2419,10 +2419,11 @@ var writeFile = Profile("bundler writeFile", function (file, builder, options) {
|
||||
const hash = file.hash();
|
||||
|
||||
if (options && options.sourceMapUrl) {
|
||||
data = new Buffer(
|
||||
addSourceMappingURL(data, options.sourceMapUrl),
|
||||
"utf8"
|
||||
);
|
||||
data = addSourceMappingURL(data, options.sourceMapUrl);
|
||||
}
|
||||
|
||||
if (! Buffer.isBuffer(data)) {
|
||||
data = new Buffer(data, "utf8");
|
||||
}
|
||||
|
||||
builder.write(file.targetPath, { data, hash });
|
||||
|
||||
Reference in New Issue
Block a user