Skip to content

Commit fb02a3a

Browse files
committed
SFD-235
Added try / catch when setting the abstract and title values.
1 parent 3782939 commit fb02a3a

File tree

1 file changed

+12
-2
lines changed
  • oscar/src/main/javascript/oscar/lib/oscar/Util/Plugin/Download

1 file changed

+12
-2
lines changed

oscar/src/main/javascript/oscar/lib/oscar/Util/Plugin/Download/WCSService.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,19 @@ oscar.Util.Plugin.Download.WCSService = new oscar.BaseClass(oscar.Util.Plugin.Do
114114
},
115115
buildInformationPanel : function() {
116116
var $panel = $$("<div></div>");
117-
var title = this.record.title[0].value || this.record.identifier[0].value;
117+
var title = "";
118+
try {
119+
title = this.record.title[0].value || this.record.identifier[0].value;
120+
} catch(err) {
121+
title="";
122+
}
118123
this.setTitle(title);
119-
var abs = this.record["abstract"][0];
124+
var abs = "";
125+
try {
126+
abs = this.record["abstract"][0];
127+
} catch(err) {
128+
abs = "";
129+
}
120130
$panel = $$("<div></div>");
121131
var $abstract = $$("<p></p>").html(abs);
122132
$panel.append($abstract);

0 commit comments

Comments
 (0)