From ed0751f288d2b00a862b20c2b4ef72793f93e0db Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 13 Nov 2017 16:06:18 +1100 Subject: [PATCH] always double check there is a class first --- lib/cooked_post_processor.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cooked_post_processor.rb b/lib/cooked_post_processor.rb index 1f413c07ec3..077b878f22f 100644 --- a/lib/cooked_post_processor.rb +++ b/lib/cooked_post_processor.rb @@ -336,7 +336,7 @@ class CookedPostProcessor found = false parent = img while parent = parent.parent - if parent["class"].include? "whitelistedgeneric" + if parent["class"] && parent["class"].include?("whitelistedgeneric") found = true break end