diff --git a/NEWS.md b/NEWS.md index fad5ad5..42bc76d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,9 @@ # News +## 1.0.2 + * Fix: digging was broken due to fragment_path being nil when calling `found_path!`, and + another instance where Searcher did not take Props::Options into account + ## 1.0.1 * Fix: second props partial render on the same view returns nil. The `@__json` instance variable persisted after the first partial finalized, causing diff --git a/lib/props_template/extensions/partial_renderer.rb b/lib/props_template/extensions/partial_renderer.rb index 36d32bc..29055ef 100644 --- a/lib/props_template/extensions/partial_renderer.rb +++ b/lib/props_template/extensions/partial_renderer.rb @@ -49,9 +49,15 @@ def find_template(partial_opts) partial = partial_opts[:partial] template_keys = retrieve_template_keys(partial_opts) details = extract_details(partial_opts) + lookup_context = @context.lookup_context - prefixes = partial.include?("/") ? [] : @context.lookup_context.prefixes - @context.lookup_context.find_template(partial, prefixes, true, template_keys, details) + prefixes = partial.include?("/") ? [] : lookup_context.prefixes + + if lookup_context.respond_to?(:find!) + lookup_context.find!(partial, prefixes, true, template_keys, details) + else + lookup_context.find_template(partial, prefixes, true, template_keys, details) + end end def retrieve_template_keys(options) diff --git a/lib/props_template/version.rb b/lib/props_template/version.rb index 162fb4d..3a3a408 100644 --- a/lib/props_template/version.rb +++ b/lib/props_template/version.rb @@ -1,3 +1,3 @@ module Props - VERSION = "1.0.1".freeze + VERSION = "1.0.2".freeze end