Fix error while validating scrape stage options

This commit is contained in:
Shadowfacts 2019-11-01 18:27:08 -04:00
parent 1a934430cc
commit 5d38d9567e
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
1 changed files with 12 additions and 6 deletions

View File

@ -39,6 +39,8 @@ defmodule Frenzy.Pipeline.ScrapeStage do
end
end
case opts do
{:ok, opts} ->
case opts["convert_to_data_uris"] do
nil ->
{:ok, %{opts | convert_to_data_uris: true}}
@ -49,6 +51,10 @@ defmodule Frenzy.Pipeline.ScrapeStage do
_ ->
{:error, "convert_to_data_uris must be a boolean"}
end
_ ->
opts
end
end
@impl Stage