Make sure options are available before getting access to its properties

This commit is contained in:
Hadi Nategh 2014-10-06 15:47:22 +00:00
parent dcbe69a620
commit b7229cdcdf

View File

@ -768,7 +768,7 @@ var et2_link_entry = et2_inputWidget.extend(
}, },
getValue: function() { getValue: function() {
var value = this.options && this.options.only_app ? this.options.value.id : this.options.value || null; var value = this.options && this.options.only_app ? this.options.value.id : this.options? this.options.value: null;
if(!this.options.only_app && this.search) if(!this.options.only_app && this.search)
{ {
value.search = this.search.val(); value.search = this.search.val();