aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/helpers/handlebars/eachWithPrevious.js
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2016-12-29 11:37:28 +0100
committerGitHub <noreply@github.com>2016-12-29 11:37:28 +0100
commitc85948205409283fa7dec4ab1db9764acc0d3ce9 (patch)
treeb4fbd692e4ce6cc93ccf417173242398adecf9c1 /server/sonar-web/src/main/js/helpers/handlebars/eachWithPrevious.js
parent5595c2f862cca1d07312c9219013f836e45a5f90 (diff)
downloadsonarqube-c85948205409283fa7dec4ab1db9764acc0d3ce9.tar.gz
sonarqube-c85948205409283fa7dec4ab1db9764acc0d3ce9.zip
remove explicit _ and $ dependecies (#1487)
Diffstat (limited to 'server/sonar-web/src/main/js/helpers/handlebars/eachWithPrevious.js')
-rw-r--r--server/sonar-web/src/main/js/helpers/handlebars/eachWithPrevious.js4
1 files changed, 1 insertions, 3 deletions
diff --git a/server/sonar-web/src/main/js/helpers/handlebars/eachWithPrevious.js b/server/sonar-web/src/main/js/helpers/handlebars/eachWithPrevious.js
index f2278c37590..ed31e615e7b 100644
--- a/server/sonar-web/src/main/js/helpers/handlebars/eachWithPrevious.js
+++ b/server/sonar-web/src/main/js/helpers/handlebars/eachWithPrevious.js
@@ -17,15 +17,13 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import _ from 'underscore';
-
module.exports = function (context, options) {
let ret = '';
if (Array.isArray(context)) {
context.forEach((element, index, list) => {
const previous = index > 0 ? list[index - 1] : null;
- const c = _.extend({ '_previous': previous }, element);
+ const c = { '_previous': previous, ...element };
ret += options.fn(c);
});
}