on master help sign in
Fixed infinate recursion bug
commitc050296a6f7c8ed1a81c3952cce8d3d970924674 authoriko <ilyakooo0@gmail.com> dateTue 5 Feb 2019, 15:01 (8 years ago) parent79a69f5
1 file changed+1−1
src/Foo/Data.hs+1−1
src/Foo/Data.hs+1−1
@@ -209,7 +209,7 @@ startAddingPosts lim cfg = do
209209
210210
211211 let postCount = length postIds
212− let toDeleteIndecies = take deleteCount $ shuffle' postIds postCount g
212+ let toDeleteIndecies = if postCount == 0 then [] else take deleteCount $ shuffle' postIds postCount g
213213
214214 let toAdd = max 0 $ lim - length postIds + length toDeleteIndecies
215215