Skip to content

Commit

Permalink
fix(dialyzer): resolve dialyzer error
Browse files Browse the repository at this point in the history
  • Loading branch information
akinsey committed Sep 7, 2024
1 parent 8e72e47 commit db4a379
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/epochtalk_server/models/thread.ex
Original file line number Diff line number Diff line change
Expand Up @@ -710,12 +710,12 @@ defmodule EpochtalkServer.Models.Thread do
thread_count = if normal_thread_count, do: normal_thread_count - sticky_thread_count

# check if supplied page is outside range of threads
if page > ceil(thread_count / opts[:per_page]) do
if is_integer(thread_count) and page > ceil(thread_count / opts[:per_page]) do
{:has_threads, false}
else
# determine wheter to start from front or back
opts =
if not is_nil(thread_count) and opts[:offset] > floor(thread_count / 2) do
if is_integer(thread_count) and opts[:offset] > floor(thread_count / 2) do
# invert reverse
reversed = !opts[:reversed]
opts = Keyword.put(opts, :reversed, reversed)
Expand Down

0 comments on commit db4a379

Please sign in to comment.