From 87d6dfe8de0c2687eac2e2cb1717338fc5bb5791 Mon Sep 17 00:00:00 2001 From: Connor Turland Date: Thu, 24 Mar 2016 23:36:57 -0700 Subject: [PATCH] fix the autocomplete --- app/helpers/topics_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/topics_helper.rb b/app/helpers/topics_helper.rb index 482a663c..9e7d82dc 100644 --- a/app/helpers/topics_helper.rb +++ b/app/helpers/topics_helper.rb @@ -8,7 +8,7 @@ module TopicsHelper topic['id'] = t.id topic['label'] = t.name topic['value'] = t.name - topic['description'] = t.desc.truncate(70) # make this return matched results + topic['description'] = t.desc ? t.desc.truncate(70) : '' # make this return matched results topic['type'] = t.metacode.name topic['typeImageURL'] = t.metacode.icon topic['permission'] = t.permission