Skip to content

Conversation

@raulrpearson
Copy link
Contributor

As part of some recent S3 changes, we added a couple of functions to generate/get slide URLs for presentation display. One of these clauses takes a presentation file and calls the 2-arity version of the function:

def get_slide_urls(%PresentationFile{} = presentation) do
  get_slide_urls(presentation.hash, presentation.length)
end

The implicit assumption I made was that a PresentationFile struct would always represent an existing presentation with a non-nil hash and a non-zero length. That's not the case and we've found in production that the 2-arity function is being called as get_slide_urls(nil, 0). This PR adds that clause returning an empty list, which fits what the LiveViews are happy to handle right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant