Skip to content
This repository was archived by the owner on Nov 9, 2024. It is now read-only.

Commit ac61324

Browse files
authored
fix: reverse order for uniqueByName util
Fixes #290 @SunriseFox
1 parent ce10e65 commit ac61324

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/utils.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,10 @@ export function toDataAttributes(attrs) {
3232
return dataAttrs;
3333
}
3434

35-
export function uniqueByName(arr) {
35+
export function uniqueByName(arrNaturalOrder) {
3636
const output = [];
3737
const lookup = Object.create(null);
38+
const arr = arrNaturalOrder.reverse();
3839

3940
for (const item in arr) {
4041
if (lookup[arr[item].name] === undefined) {

0 commit comments

Comments
 (0)