diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/serve.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/serve.js b/lib/serve.js index 562476d..96f8313 100644 --- a/lib/serve.js +++ b/lib/serve.js @@ -3418,13 +3418,21 @@ Serve.prototype.wrapPublic = function (opts) { }) } +function uniqueLink() { + var seen = {} + return function (link) { + if (seen[link.link]) return false + return seen[link.link] = true + } +} + Serve.prototype.askWantBlobsForm = function (links) { var self = this return ph('form', {action: '', method: 'post'}, [ ph('section', [ ph('h3', 'Missing blobs'), ph('p', 'The application needs these blobs to continue:'), - ph('table', links.map(u.toLink).map(function (link) { + ph('table', links.map(u.toLink).filter(uniqueLink()).map(function (link) { if (!u.isRef(link.link)) return return ph('tr', [ ph('td', ph('code', link.link)), |