Skip to content

Commit ef48dee

Browse files
authored
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.
1 parent dde8684 commit ef48dee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

js/anchor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ function getSubclass( Super ) {
230230
Item.optionKeys = Super.optionKeys.slice( 0 );
231231
// add defaults keys to optionKeys, dedupe
232232
Object.keys( Item.defaults ).forEach( function( key ) {
233-
if ( !Item.optionKeys.indexOf( key ) != 1 ) {
233+
if ( Item.optionKeys.indexOf( key ) != -1 ) {
234234
Item.optionKeys.push( key );
235235
}
236236
} );

0 commit comments

Comments
 (0)