From b56801d27f75534a49bb2661b89193f7228d8677 Mon Sep 17 00:00:00 2001 From: Christopher De Cairos Date: Wed, 29 May 2013 15:02:00 -0400 Subject: [PATCH] Bug 871700 - filter out duplicate tags --- routes/make.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/routes/make.js b/routes/make.js index 16258a4..91d1a83 100644 --- a/routes/make.js +++ b/routes/make.js @@ -35,7 +35,9 @@ module.exports = function( makeCtor, env ) { if ( field in body ) { // arrays need to be concatenated to avoid overwriting elements in the original. if ( Array.isArray( make[ field ] ) ) { - make[ field ] = make[ field ].concat( body[ field ] ); + make[ field ] = make[ field ].concat( body[ field ] ).filter(function( tag, pos, arr ) { + return arr.indexOf( tag ) === pos; + }); } else { make[ field ] = body[ field ]; }