Skip to content
This repository has been archived by the owner on Feb 4, 2022. It is now read-only.

Commit

Permalink
fix(utils): don't throw if no snappy
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 authored and mbroadst committed Nov 6, 2017
1 parent ac68e76 commit 55bf2ad
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/connection/utils.js
Expand Up @@ -89,7 +89,10 @@ var noSnappyWarning = function() {

// Facilitate loading Snappy optionally
var retrieveSnappy = function() {
var snappy = require_optional('snappy');
var snappy = null;
try {
snappy = require_optional('snappy');
} catch (error) {} // eslint-disable-line
if (!snappy) {
snappy = {
compress: noSnappyWarning,
Expand Down

0 comments on commit 55bf2ad

Please sign in to comment.