mirror of
https://github.com/ivuorinen/base-configs.git
synced 2026-01-26 03:03:59 +00:00
fix: add an initial value to "reduce()" call (#238)
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
const configurationPaths = require('../lib/configuration-paths')
|
||||
|
||||
const configItems = configurationPaths('`[module name]`')
|
||||
const longestLine = configItems.reduce((a, b) => (a.length > b.length ? a : b)).length
|
||||
const longestLine = configItems.reduce((a, b) => (a.length > b.length ? a : b), 0).length
|
||||
|
||||
const mdTable = configItems.map(file => {
|
||||
const diff = longestLine - file.length
|
||||
|
||||
Reference in New Issue
Block a user