mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-28 01:29:05 +01:00
Avoid JS error if value is undefined
This commit is contained in:
parent
0dfbd549f9
commit
c330df915f
@ -185,7 +185,7 @@ var et2_link_to = (function(){ "use strict"; return et2_inputWidget.extend(
|
|||||||
};
|
};
|
||||||
// only set server-side callback, if we have a real application-id (not null or array)
|
// only set server-side callback, if we have a real application-id (not null or array)
|
||||||
// otherwise it only gives an error on server-side
|
// otherwise it only gives an error on server-side
|
||||||
if (self.options.value.to_id && typeof self.options.value.to_id != 'object') {
|
if (self.options.value && self.options.value.to_id && typeof self.options.value.to_id != 'object') {
|
||||||
select_attrs.method = 'EGroupware\\Api\\Etemplate\\Widget\\Link::link_existing';
|
select_attrs.method = 'EGroupware\\Api\\Etemplate\\Widget\\Link::link_existing';
|
||||||
select_attrs.method_id = self.options.value.to_app + ':' + self.options.value.to_id;
|
select_attrs.method_id = self.options.value.to_app + ':' + self.options.value.to_id;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user