From 0e6de2c31dbf8c21277481f112e99c52b913940f Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 27 Dec 2017 19:33:54 +0100 Subject: node_modules --- node_modules/boxen/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'node_modules/boxen/index.js') diff --git a/node_modules/boxen/index.js b/node_modules/boxen/index.js index 0fe96a5a4..b54b92dc6 100644 --- a/node_modules/boxen/index.js +++ b/node_modules/boxen/index.js @@ -115,7 +115,7 @@ module.exports = (text, opts) => { let marginLeft = PAD.repeat(margin.left); if (opts.float === 'center') { - const padWidth = (columns - contentWidth) / 2; + const padWidth = Math.max((columns - contentWidth) / 2, 0); marginLeft = PAD.repeat(padWidth); } else if (opts.float === 'right') { const padWidth = Math.max(columns - contentWidth - margin.right - 2, 0); -- cgit v1.2.3