Commit 21a0f975 authored by 张九刚's avatar 张九刚

修改buffer格式

parent 2339e01d
...@@ -270,10 +270,9 @@ async function execute(psdFile, options = {}) { ...@@ -270,10 +270,9 @@ async function execute(psdFile, options = {}) {
assets, assets,
view: viewRoot, view: viewRoot,
}; };
return data;
/* let dataString = JSON.stringify(data); let dataString = JSON.stringify(data);
let buf = new Buffer(dataString); let buf = new Buffer.from(dataString);
return await new Promise((resolve, reject) => { return await new Promise((resolve, reject) => {
zlib.gzip(buf, function (err, res) { zlib.gzip(buf, function (err, res) {
if (err) { if (err) {
...@@ -283,7 +282,7 @@ async function execute(psdFile, options = {}) { ...@@ -283,7 +282,7 @@ async function execute(psdFile, options = {}) {
resolve(res); resolve(res);
} }
}); });
}) */ })
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment