Skip to content

Commit

Permalink
Merge pull request #1619 from ushahidi/hotfix-map-load-posts
Browse files Browse the repository at this point in the history
hotfix(Map): load posts should be deferred and return the promise
  • Loading branch information
tuxpiper committed Nov 16, 2020
2 parents 208442a + c458497 commit 6e70013
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/main/posts/views/post-view-map.directive.js
Expand Up @@ -169,7 +169,7 @@ function PostViewMap(PostEndpoint, Maps, _, PostFilters, L, $q, $rootScope, $com

let getFirstPostChunk = PostEndpoint.geojson(conditions);
currentGeoJsonRequests.push(getFirstPostChunk);
getFirstPostChunk.$promise.then(function (posts) {
return getFirstPostChunk.$promise.then(function (posts) {
// Adding the first 200 posts to map here and getting the totals
$scope.stats.filteredPosts = posts.total;
addPostsToMap(posts)
Expand Down

0 comments on commit 6e70013

Please sign in to comment.