Skip to content

Commit

Permalink
avoid destructuring array for getting first element
Browse files Browse the repository at this point in the history
It seems this modern JS syntax is not compatible with certain old
dependency combination.
  • Loading branch information
Belco90 committed Mar 27, 2022
1 parent 15b81c9 commit 02efc2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rules/jsx-no-leaked-zero.js
Expand Up @@ -60,7 +60,7 @@ module.exports = {
create(context) {
const config = context.options[0] || {};
const validFixStrategies = config.validFixStrategies || DEFAULT_VALID_FIX_STRATEGIES;
const [fixStrategy] = validFixStrategies;
const fixStrategy = validFixStrategies[0];
const areBothStrategiesValid = validFixStrategies.length === 2;

function trimLeftNode(node) {
Expand Down

0 comments on commit 02efc2d

Please sign in to comment.