From 6edd2baec931e9941c32cc8bab6ba622c9635502 Mon Sep 17 00:00:00 2001 From: Pat Hawks Date: Sat, 21 Mar 2015 19:39:23 -0700 Subject: [PATCH] Use `has_key?` --- lib/jekyll-gist/gist_tag.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/jekyll-gist/gist_tag.rb b/lib/jekyll-gist/gist_tag.rb index 5d9f5fd..9822bd7 100644 --- a/lib/jekyll-gist/gist_tag.rb +++ b/lib/jekyll-gist/gist_tag.rb @@ -5,10 +5,10 @@ class GistTag < Liquid::Tag def render(context) if tag_contents = determine_arguments(@markup.strip) gist_id, filename = tag_contents[0], tag_contents[1] - if context[gist_id] + if context.has_key?(gist_id) gist_id = context[gist_id] end - if context[filename] + if context.has_key?(filename) filename = context[filename] end gist_script_tag(gist_id, filename)