Skip to content

Commit

Permalink
hack for #1019 issue (#1047)
Browse files Browse the repository at this point in the history
  • Loading branch information
miherlosev authored and churkin committed Feb 20, 2017
1 parent 37b23d8 commit b152def
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/processing/encoding/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import zlib from 'zlib';
import brotli from 'brotli';
import charsetEncoder from 'iconv-lite';
import promisify from '../../utils/promisify';

Expand Down Expand Up @@ -35,7 +34,7 @@ export async function decodeContent (content, encoding, charset) {
content = await inflateWithFallback(content);

else if (encoding === BROTLI_CONTENT_ENCODING)
content = new Buffer(brotli.decompress(content));
content = new Buffer(require('brotli').decompress(content));

charset.fromBOM(content);

Expand All @@ -52,7 +51,7 @@ export async function encodeContent (content, encoding, charset) {
return deflate(content);

if (encoding === BROTLI_CONTENT_ENCODING)
return new Buffer(brotli.compress(content));
return new Buffer(require('brotli').compress(content));

return content;
}

0 comments on commit b152def

Please sign in to comment.