Fix: Images could not be attached with vouchers as lodash depreciated the "any" function in v4.0
This commit is contained in:
parent
be8f71259c
commit
0ff8397a4c
2
brewman/static/scripts/angular_service.js
vendored
2
brewman/static/scripts/angular_service.js
vendored
@ -434,7 +434,7 @@ overlordService.factory("uploadedImageResizer", ["$q", "ReaderPromise", function
|
|||||||
|
|
||||||
var ProcessUpload = function (uploadedFile, oldFiles) {
|
var ProcessUpload = function (uploadedFile, oldFiles) {
|
||||||
var file = {File: uploadedFile.file},
|
var file = {File: uploadedFile.file},
|
||||||
exists = _.any(oldFiles, function (value) {
|
exists = _.some(oldFiles, function (value) {
|
||||||
return angular.equals(value.File, file.File);
|
return angular.equals(value.File, file.File);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ var LedgerController = ['$scope', '$routeParams', '$location', 'asDateFilter', '
|
|||||||
|
|
||||||
if (hidden.length !== 0) {
|
if (hidden.length !== 0) {
|
||||||
data = _.filter(data, function (item) {
|
data = _.filter(data, function (item) {
|
||||||
return !_.any(hidden, function (hi) {
|
return !_.some(hidden, function (hi) {
|
||||||
return item.ID === hi;
|
return item.ID === hi;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user