summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/postrunner/DataSources.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/postrunner/DataSources.rb b/lib/postrunner/DataSources.rb
index 3db5547..29cd1e4 100644
--- a/lib/postrunner/DataSources.rb
+++ b/lib/postrunner/DataSources.rb
@@ -75,8 +75,12 @@ module PostRunner
def device_name(index)
@fit_activity.device_infos.each do |device|
if device.device_index == index
- return (DeviceList::DeviceTypeNames[device.device_type] ||
- device.device_type) + " [#{device.device_index}]"
+ if device.device_type
+ return (DeviceList::DeviceTypeNames[device.device_type] ||
+ device.device_type) + " [#{device.device_index}]"
+ else
+ return "Unknown [#{device.device_index}]"
+ end
end
end