Skip to content

Commit 163aff9

Browse files
committed
Refactored utils.orderProperties.
1 parent f0a577b commit 163aff9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ export function orderProperties(properties, order) {
8989
throw new Error(
9090
"uiSchema order list length should match object properties length");
9191
}
92-
if ([].slice.call(order).sort().toString() !==
93-
[].slice.call(properties).sort().toString()) {
92+
const fingerprint = (arr) => [].slice.call(arr).sort().toString();
93+
if (fingerprint(order) !== fingerprint(properties)) {
9494
throw new Error(
9595
"uiSchema order list does not match object properties list");
9696
}

0 commit comments

Comments
 (0)