diff --git a/extraPlugin/extra-plugin.js b/extraPlugin/extra-plugin.js index 929ded818..20aa22cde 100644 --- a/extraPlugin/extra-plugin.js +++ b/extraPlugin/extra-plugin.js @@ -17,7 +17,7 @@ const extraRoutesPlugin = (route, options) => { return []; }; -extraRoutesPlugin[configValidator] = async options => { +const validator = async options => { const errors = []; if (options.numberOfPages && typeof options.numberOfPages !== 'number') { @@ -42,5 +42,5 @@ extraRoutesPlugin[configValidator] = async options => { return errors; }; -registerPlugin('router', 'extra', extraRoutesPlugin); +registerPlugin('router', 'extra', extraRoutesPlugin, validator); module.exports.extraRoutesPlugin = extraRoutesPlugin; diff --git a/extraPlugin/tocPlugin.js b/extraPlugin/tocPlugin.js index 9fddb4dc0..30c6b81d4 100644 --- a/extraPlugin/tocPlugin.js +++ b/extraPlugin/tocPlugin.js @@ -24,5 +24,5 @@ const tocPlugin = async (html, options) => { return html; }; -tocPlugin[configValidator] = async config => []; -registerPlugin('render', 'toc', tocPlugin); +const validator = async config => []; +registerPlugin('render', 'toc', tocPlugin, validator); diff --git a/extraPlugin/voidPlugin.js b/extraPlugin/voidPlugin.js index 3ec9af6bf..60f4cac3c 100644 --- a/extraPlugin/voidPlugin.js +++ b/extraPlugin/voidPlugin.js @@ -9,5 +9,5 @@ const voidPlugin = async (route, options) => { return []; }; -voidPlugin[configValidator] = async conf => []; -registerPlugin('router', 'void', voidPlugin); +const validator = async conf => []; +registerPlugin('router', 'void', voidPlugin, validator);