From df6902a535ec6f60bc6b6c05fdfa0fdee582f895 Mon Sep 17 00:00:00 2001 From: echarp Date: Mon, 11 Jan 2016 13:06:39 +0100 Subject: [PATCH] Attempt to a quick correction --- app/views/versions/index.haml | 2 +- app/views/versions/index.rss.builder | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/versions/index.haml b/app/views/versions/index.haml index f5f301a1..0aa82ea3 100644 --- a/app/views/versions/index.haml +++ b/app/views/versions/index.haml @@ -24,7 +24,7 @@ version.changeset.each do |key, val| changes += version.item_type.constantize.human_attribute_name(key) changes += ': ' - if key == 'description' + if key == 'description' && val[0].present? && val[1].present? changes += Differ.diff(val[1], val[0]).to_s else changes += "#{val[0]} -> #{val[1]}" diff --git a/app/views/versions/index.rss.builder b/app/views/versions/index.rss.builder index c67441ae..1d7a964e 100644 --- a/app/views/versions/index.rss.builder +++ b/app/views/versions/index.rss.builder @@ -60,7 +60,7 @@ xml.rdf :RDF, version.changeset.each do |key, val| changes += version.item_type.constantize.human_attribute_name(key) changes += ': ' - if key == 'description' + if key == 'description' && val[0].present? && val[1].present? changes += Differ.diff(val[1], val[0]).to_s else changes += "#{val[0]} -> #{val[1]}"