Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 8 additions & 2 deletions lib/props_template/extensions/partial_renderer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion lib/props_template/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Props
VERSION = "1.0.1".freeze
VERSION = "1.0.2".freeze
end
Loading