From acf3fd16f24ee887a70c33a16c2a757861fd8f51 Mon Sep 17 00:00:00 2001 From: melbourne2991 Date: Mon, 16 Oct 2017 00:36:54 +1100 Subject: [PATCH] Options should be optional Currently if you do not provide options you will get "cannot get property level of undefined" --- index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/index.js b/index.js index d04362a..9edfe29 100644 --- a/index.js +++ b/index.js @@ -10,6 +10,7 @@ var util = require('util'), var WinstonCloudWatch = function(options) { + options = options || {}; winston.Transport.call(this, options); this.level = options.level || 'info'; this.name = options.name || 'CloudWatch';