From 1aea1580c193c271b8cc083607105da363af358f Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Mon, 30 Aug 2021 14:33:21 +0530 Subject: [PATCH] Utilize previously allocated local variable Follow-up to aa9a416 --- lib/jekyll/tags/include.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/jekyll/tags/include.rb b/lib/jekyll/tags/include.rb index 6befb3d5..058d8280 100644 --- a/lib/jekyll/tags/include.rb +++ b/lib/jekyll/tags/include.rb @@ -237,12 +237,11 @@ module Jekyll page = context.registers[:page] return unless page&.key?("path") - page_path = context.registers[:page]["path"] absolute_path = \ if page["collection"] - @site.in_source_dir(@site.config["collections_dir"], page_path) + @site.in_source_dir(@site.config["collections_dir"], page["path"]) else - @site.in_source_dir(page_path) + @site.in_source_dir(page["path"]) end @site.regenerator.add_dependency(absolute_path, inclusion.path)