From cb646a47b7fe22cb8159d85cfe20dad88f50d786 Mon Sep 17 00:00:00 2001
From: Gordon Sim <gsim@redhat.com>
Date: Thu, 2 Aug 2018 17:41:32 +0100
Subject: [PATCH] handle older versions of debug library
---
lib/log.js | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/lib/log.js b/lib/log.js
index d00ea90..e8e4268 100644
--- a/lib/log.js
+++ b/lib/log.js
@@ -17,9 +17,11 @@
var debug = require('debug');
-debug.formatters.h = function (v) {
- return v.toString('hex');
-};
+if (debug.formatters) {
+ debug.formatters.h = function (v) {
+ return v.toString('hex');
+ };
+}
module.exports = {
'frames' : debug('rhea:frames'),
--
2.9.5