From 5975e0c4cd98dcbdf2b5c6227ccd9fc1b225e16e Mon Sep 17 00:00:00 2001 From: gargroh <42495927+gargroh@users.noreply.github.com> Date: Mon, 5 Aug 2019 20:15:01 +0530 Subject: [PATCH] [Minor] use actual param in `ensurePluginOrder` (#1429) --- src/utils.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/utils.js b/src/utils.js index 54d3dfb..6173ab9 100755 --- a/src/utils.js +++ b/src/utils.js @@ -310,9 +310,9 @@ export function flattenBy(columns, childKey) { return flatColumns } -export function ensurePluginOrder(plugins, befores, plugin, afters) { +export function ensurePluginOrder(plugins, befores, pluginName, afters) { const pluginIndex = plugins.findIndex( - plugin => plugin.pluginName === 'useFilters' + plugin => plugin.pluginName === pluginName ) befores.forEach(before => { @@ -321,7 +321,7 @@ export function ensurePluginOrder(plugins, befores, plugin, afters) { ) if (beforeIndex > pluginIndex) { throw new Error( - `React Table: The ${plugin} plugin hook must be placed after the ${before} plugin hook!` + `React Table: The ${pluginName} plugin hook must be placed after the ${before} plugin hook!` ) } }) @@ -330,7 +330,7 @@ export function ensurePluginOrder(plugins, befores, plugin, afters) { const afterIndex = plugins.findIndex(plugin => plugin.pluginName === after) if (afterIndex < pluginIndex) { throw new Error( - `React Table: The ${plugin} plugin hook must be placed before the ${after} plugin hook!` + `React Table: The ${pluginName} plugin hook must be placed before the ${after} plugin hook!` ) } })