Skip to content

Commit 7f9df2f

Browse files
author
root
committed
Fix nil data case
1 parent 2c1fc9d commit 7f9df2f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: lib/redmine_git_hosting/redmine_plugin_loader.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ def load_plugin!
114114

115115
def load_setting_file(file)
116116
return {} unless File.exists?(file)
117-
YAML::load(ERB.new(IO.read(file)).result).symbolize_keys
117+
data = YAML::load(ERB.new(IO.read(file)).result) || {}
118+
data.symbolize_keys
118119
end
119120

120121

0 commit comments

Comments
 (0)