From 4c055637a4b04f9ce5bb56c93935ce1792244f23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Alby?= Date: Mon, 7 Oct 2019 15:30:59 +0700 Subject: [PATCH] Merge pull request #2205 from overleaf/ta-replace-loadash-map Replace Lodash's Map with Native Array's Map GitOrigin-RevId: 17dac98c39e55b68a60fb0a61708a650e088853a --- services/web/app/src/Features/Compile/ClsiFormatChecker.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/web/app/src/Features/Compile/ClsiFormatChecker.js b/services/web/app/src/Features/Compile/ClsiFormatChecker.js index dacded23c9..a58f018514 100644 --- a/services/web/app/src/Features/Compile/ClsiFormatChecker.js +++ b/services/web/app/src/Features/Compile/ClsiFormatChecker.js @@ -42,7 +42,7 @@ module.exports = ClsiFormatChecker = { }, _checkForConflictingPaths(resources, callback) { - const paths = _.map(resources, 'path') + const paths = resources.map(resource => resource.path) const conflicts = _.filter(paths, function(path) { const matchingPaths = _.filter( @@ -53,7 +53,7 @@ module.exports = ClsiFormatChecker = { return matchingPaths.length > 0 }) - const conflictObjects = _.map(conflicts, conflict => ({ path: conflict })) + const conflictObjects = conflicts.map(conflict => ({ path: conflict })) return callback(null, conflictObjects) }, @@ -63,7 +63,7 @@ module.exports = ClsiFormatChecker = { let totalSize = 0 - let sizedResources = _.map(resources, function(resource) { + let sizedResources = resources.map(function(resource) { const result = { path: resource.path } if (resource.content != null) { result.size = resource.content.replace(/\n/g).length