Skip to content

Commit 002d3fe

Browse files
committed
Fix for error when trying to parse a "publications" key with no value
This patches the broken site build caused by a new file in _research that contained a "publications" key with no value. Rather than remove that line, let's make the code a bit more robust so it doesn't break in this scenario.
1 parent 64bf5ad commit 002d3fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

_plugins/research.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def generate(site)
2929
end
3030
end
3131
}
32-
if fm.key? 'publications'
32+
if fm.key? 'publications' && !fm['publications'].nil? && !fm['publications'].empty?
3333
# Create hash url for publication page
3434
data['publications'] = fm['publications'].split(',').map { |kw| kw.downcase.strip }
3535
data['publications'] = 'keywords=' + data['publications'].join(',')

0 commit comments

Comments
 (0)