Skip to content

Commit

Permalink
fix: sort custom action menu by $kind (#3368)
Browse files Browse the repository at this point in the history
Co-authored-by: Andy Brown <asbrown002@gmail.com>
  • Loading branch information
yeze322 and a-b-r-o-w-n authored Jun 10, 2020
1 parent 4d3fc66 commit 50bfc96
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,8 @@ export const getCustomSchema = (baseSchema?: OBISchema, ejectedSchema?: OBISchem
} as OBISchema
);

// Sort `oneOf` list by $kind to keep custom menu ordered
diffSchema.oneOf?.sort((a, b) => (a.$ref < b.$ref ? -1 : 1));

return diffSchema;
};

0 comments on commit 50bfc96

Please sign in to comment.