Skip to content
This repository was archived by the owner on Aug 7, 2020. It is now read-only.

Commit fc92944

Browse files
JisayAxelPeter
authored andcommitted
fix(oui-field): fix getFirstError return (#274)
* fix(oui-field): fix getFirstError return * fix(oui-field): fix after review
1 parent 433c494 commit fc92944

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/oui-field/src/field.controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ export default class FieldController {
188188

189189
getMessagesOrder () {
190190
// first known errors then custom errors
191-
return Object.keys(this.getFirstError()).sort((a, b) => MESSAGES_ORDER.indexOf(a) < MESSAGES_ORDER.indexOf(b));
191+
return Object.keys(this.getFirstError() || {}).sort((a, b) => MESSAGES_ORDER.indexOf(a) < MESSAGES_ORDER.indexOf(b));
192192
}
193193

194194
getMessageString (errorName) {

0 commit comments

Comments
 (0)