FIX: Check backtrace and backtrace_locations before trying to print an error

... during plugin initialization.
This commit is contained in:
Daniel Waterworth 2020-05-19 14:27:12 +01:00
parent f038f8f154
commit 38c05a4f07
1 changed files with 1 additions and 1 deletions

View File

@ -6,7 +6,7 @@ def plugin_initialization_guard(&block)
rescue => error
plugins_directory = Rails.root + 'plugins'
if error.backtrace
if error.backtrace && error.backtrace_locations
plugin_path = error.backtrace_locations.lazy.map do |location|
Pathname.new(location.absolute_path)
.ascend