From 81006630cd54b9e5b9f40956dc148a21991dc5be Mon Sep 17 00:00:00 2001 From: Trent Childers Date: Wed, 1 Mar 2017 16:26:51 -0600 Subject: [PATCH] Added changelog; fixed issue where lookups threw exceptions on null search and subtitle fields --- CHANGELOG.md | 11 +++++++++++ README.md | 2 +- classes/strike_lookupController.cls | 4 ++++ 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..a81cf3f --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,11 @@ +# Strike by Appiphony + +### Release 0.1.1 — March 1, 2017 + +* **Lookup**: Fixed an issue where records with `null` values for the `search` and `subtitle` fields caused lookups to throw an exception + +--- + +### Release 0.1.0 — February 24, 2017 +* Initial release +* Open sourced: https://github.com/appiphony/Strike-Components \ No newline at end of file diff --git a/README.md b/README.md index 2e7a7fe..57b91fe 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Strike by Appiphony ### Work smarter (not harder) with Salesforce Lightning Components -Current release: 0.1.0 +Current release: 0.1.1 See it in action here: http://www.lightningstrike.io --- diff --git a/classes/strike_lookupController.cls b/classes/strike_lookupController.cls index 1fde954..cb2d755 100644 --- a/classes/strike_lookupController.cls +++ b/classes/strike_lookupController.cls @@ -171,6 +171,10 @@ public with sharing class strike_lookupController { label = ((Map)label).get(fieldName); + if (label == null) { + return ''; + } + if (fieldMap.containsKey(fieldName + 'Id')) { fieldName = fieldName + 'Id'; }