diff --git a/index.js b/index.js index b985b94..f47c876 100644 --- a/index.js +++ b/index.js @@ -17,7 +17,7 @@ const { function fastifyOverview (fastify, options, next) { const opts = Object.assign({ - hideEmpty: false, + hideEmptyNodes: false, addSource: false }, options) @@ -59,7 +59,7 @@ function fastifyOverview (fastify, options, next) { throw new Error('Fastify must be in ready status to access the overview') } - if (opts.hideEmpty) { + if (opts.hideEmptyNodes) { const filterStructure = JSON.stringify(structure, (key, value) => { switch (key) { case 'decorators': diff --git a/test/index.test.js b/test/index.test.js index c7fc65b..50c8bfe 100644 --- a/test/index.test.js +++ b/test/index.test.js @@ -95,7 +95,7 @@ test('register', async t => { test('hide empty', async t => { const app = fastify() - await app.register(plugin, { hideEmpty: true }) + await app.register(plugin, { hideEmptyNodes: true }) app.decorate('emptyObject', {}) app.decorate('emptyArray', [])