Blame 0001-handle-older-versions-of-debug-library.patch

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