diff options
Diffstat (limited to 'node_modules/boxen/index.js')
-rw-r--r-- | node_modules/boxen/index.js | 2 |
1 files changed, 1 insertions, 1 deletions
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); |