Skip to content

Commit

Permalink
chore: getFuncPreview limit split size (fastify#5754)
Browse files Browse the repository at this point in the history
  • Loading branch information
gurgunday authored Oct 21, 2024
1 parent 5aa86f8 commit e61c394
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/pluginUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function getPluginName (func) {

function getFuncPreview (func) {
// takes the first two lines of the function if nothing else works
return func.toString().split('\n').slice(0, 2).map(s => s.trim()).join(' -- ')
return func.toString().split('\n', 2).map(s => s.trim()).join(' -- ')
}

function getDisplayName (fn) {
Expand Down

0 comments on commit e61c394

Please sign in to comment.