From c248318e3d9400ac7ce31b8a3202a8d8fd8c20bc Mon Sep 17 00:00:00 2001 From: Different55 Date: Tue, 22 Apr 2025 23:42:47 -0500 Subject: [PATCH] Fix deduplication of objectKeys This one conditional got improperly warped when it migrated away from `Array.includes()`. In its current form it always pushes a new copy unless there's a match at precisely index array 1. --- js/anchor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/anchor.js b/js/anchor.js index 1860e8c..7c8905d 100644 --- a/js/anchor.js +++ b/js/anchor.js @@ -230,7 +230,7 @@ function getSubclass( Super ) { Item.optionKeys = Super.optionKeys.slice( 0 ); // add defaults keys to optionKeys, dedupe Object.keys( Item.defaults ).forEach( function( key ) { - if ( !Item.optionKeys.indexOf( key ) != 1 ) { + if ( Item.optionKeys.indexOf( key ) === -1 ) { Item.optionKeys.push( key ); } } );