Skip to content

Commit

Permalink
hack for DevExpress#1019 issue (DevExpress#1047)
Browse files Browse the repository at this point in the history
  • Loading branch information
miherlosev authored and AndreyBelym committed Feb 28, 2019
1 parent 151fc90 commit 15086dd
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 15086dd

Please sign in to comment.