From 0ff8397a4c5f34e4b8989cfe34f2749e81d488e4 Mon Sep 17 00:00:00 2001 From: tanshu Date: Sat, 24 Dec 2016 17:22:36 +0530 Subject: [PATCH] Fix: Images could not be attached with vouchers as lodash depreciated the "any" function in v4.0 --- brewman/static/scripts/angular_service.js | 2 +- brewman/static/scripts/ledger.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/brewman/static/scripts/angular_service.js b/brewman/static/scripts/angular_service.js index a392eee5..6c7cdd37 100644 --- a/brewman/static/scripts/angular_service.js +++ b/brewman/static/scripts/angular_service.js @@ -434,7 +434,7 @@ overlordService.factory("uploadedImageResizer", ["$q", "ReaderPromise", function var ProcessUpload = function (uploadedFile, oldFiles) { var file = {File: uploadedFile.file}, - exists = _.any(oldFiles, function (value) { + exists = _.some(oldFiles, function (value) { return angular.equals(value.File, file.File); }); diff --git a/brewman/static/scripts/ledger.js b/brewman/static/scripts/ledger.js index 8a947885..f38fcaa4 100644 --- a/brewman/static/scripts/ledger.js +++ b/brewman/static/scripts/ledger.js @@ -53,7 +53,7 @@ var LedgerController = ['$scope', '$routeParams', '$location', 'asDateFilter', ' if (hidden.length !== 0) { data = _.filter(data, function (item) { - return !_.any(hidden, function (hi) { + return !_.some(hidden, function (hi) { return item.ID === hi; }); });