diff --git a/src/options/method.js b/src/options/method.js index b2c5dfb7..be2d50b6 100644 --- a/src/options/method.js +++ b/src/options/method.js @@ -33,7 +33,7 @@ export const getMethodOpts = (args, plugin) => { return { args } } - const lastArg = args[args.length - 1] + const lastArg = args.at(-1) return lastArgIsOptions(plugin, lastArg) ? { args: args.slice(0, -1), methodOpts: { [plugin.name]: lastArg } } : { args }