Skip to content

Cannot read property '$order' of undefined - Error Log #1594

@ghost

Description

optgroup = '';

groups_order.push(optgroup);

When optgroup ='' and then it will be pushed to optgroups.
After that, the group_order sort by optgroups[i].$order which optgroups[''].$order will not exist.
var b_order = self.optgroups[b].$order || 0;

Can we also check like below?

var a_order = self.optgroups[a] && self.optgroups[a].$order || 0;
var b_order = self.optgroups[b] && self.optgroups[b].$order || 0;

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions