From 5c5e14c816eb0871344bb69a96bc4bb38e0d3061 Mon Sep 17 00:00:00 2001 From: "Renato \"Lond\" Cerqueira" Date: Mon, 14 Jan 2019 17:28:41 +0100 Subject: Fix undefined method error in sidekiq (#9807) * Fix undefined method error in sidekiq Body can be not nil but still be empty, which causes a `NoMethodError: undefined method `[]' for nil:NilClass` further in the code. This checks for an empty body to avoid the issue. * Fix codeclimate issue --- spec/fixtures/requests/oembed_json_empty.html | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 spec/fixtures/requests/oembed_json_empty.html (limited to 'spec/fixtures/requests') diff --git a/spec/fixtures/requests/oembed_json_empty.html b/spec/fixtures/requests/oembed_json_empty.html new file mode 100644 index 000000000..4b02413aa --- /dev/null +++ b/spec/fixtures/requests/oembed_json_empty.html @@ -0,0 +1,7 @@ + + + + + + + -- cgit