diff --git a/services/web/public/coffee/models/File.coffee b/services/web/public/coffee/models/File.coffee index 3a59bab5fb..d4fc8b006f 100644 --- a/services/web/public/coffee/models/File.coffee +++ b/services/web/public/coffee/models/File.coffee @@ -7,7 +7,7 @@ define [ previewUrl: () -> - extension = @get("name").split(".").pop() + extension = @get("name").split(".").pop()?.toLowerCase() needsConverting = (["eps", "pdf"].indexOf(extension) != -1) queryString = if needsConverting then "?format=png" else "" url = "#{@downloadUrl()}#{queryString}"