From c992198204a7f5a8b5a9dc293d6277b4f93a3de4 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Wed, 15 Oct 2014 14:29:09 -0400 Subject: [PATCH] docs: fixes #260 - give method sorting preferential treatment to ctors --- docs/components/docs/docs.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/components/docs/docs.js b/docs/components/docs/docs.js index 96af4591334..6c7050dd1f3 100644 --- a/docs/components/docs/docs.js +++ b/docs/components/docs/docs.js @@ -138,9 +138,7 @@ angular })[0] }; }) - .sort(function(a, b) { - return a.constructor ? -1: a.name > b.name; - }); + .sort(compareMethods); }; } @@ -175,9 +173,7 @@ angular acc = acc.concat(mixInMethods); return acc; }, data) - .sort(function(a, b) { - return a.name > b.name; - }); + .sort(compareMethods); }; } } @@ -213,6 +209,10 @@ angular .then(setSingleMethod($location.search().method)); } + function compareMethods(a, b) { + return a.constructor ? -1: a.name > b.name; + } + function getLinks($route, getLinks) { return getLinks($route.current.params.version); }