From ab7709dbb6e26a65f5dd062f0c334848a446f033 Mon Sep 17 00:00:00 2001 From: Steve Purcell Date: Fri, 11 Jul 2014 14:29:03 +0100 Subject: [PATCH] Display package pages when accessed via old names --- html/js/melpa.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/html/js/melpa.js b/html/js/melpa.js index 006358d3..440f88dc 100644 --- a/html/js/melpa.js +++ b/html/js/melpa.js @@ -76,7 +76,12 @@ return packages; }; var packagesByName = {}; - _.each(packages, function(p) { packagesByName[p.name] = p; }); + _.each(packages, function(p) { + packagesByName[p.name] = p; + if(p.oldNames) { + _.each(p.oldNames, function(n) { packagesByName[n] = p; }); + } + }); this.packageWithName = function(name) { return packagesByName[name]; };