diff --git a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/util/FormUtil.js b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/util/FormUtil.js index d60d3b5a53dab4a5308e3440381bba83eda26378..e2ab960e1dd67ddd9cca12b3d782d12b5190a680 100644 --- a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/util/FormUtil.js +++ b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/util/FormUtil.js @@ -388,14 +388,15 @@ var FormUtil = new function() { var vocabulary = null; if(isNaN(propertyType.vocabulary)) { vocabulary = this.profile.getVocabularyById(propertyType.vocabulary.id); - if(vocabulary === null) { //This should not happen, but can save the day. - vocabulary = propertyType.vocabulary; - vocabulary.terms = propertyType.terms; - } } else { vocabulary = this.profile.getVocabularyById(propertyType.vocabulary); } + if(!vocabulary && propertyType.terms) { //This should not happen, but can save the day. + vocabulary = {}; + vocabulary.terms = propertyType.terms; + } + $component = this._getDropDownFieldForVocabulary(propertyType.code, vocabulary.terms, propertyType.description, propertyType.mandatory); } else if (propertyType.dataType === "HYPERLINK") { $component = this._getInputField("url", propertyType.code, propertyType.description, null, propertyType.mandatory);