Etemplate: Don't try to expand src if it is empty

This commit is contained in:
nathangray 2020-11-24 10:24:36 -07:00
parent 5ebcc62626
commit 3e371ea51f
2 changed files with 4 additions and 4 deletions

View File

@ -76,8 +76,8 @@ var et2_image = /** @class */ (function (_super) {
// Check to expand name // Check to expand name
if (typeof _attrs["src"] != "undefined") { if (typeof _attrs["src"] != "undefined") {
var manager = this.getArrayMgr("content"); var manager = this.getArrayMgr("content");
if (manager) { if (manager && _attrs["src"]) {
var src = manager.getEntry(_attrs["src"]); var src = manager.getEntry(_attrs["src"], false, true);
if (typeof src != "undefined" && src !== null) { if (typeof src != "undefined" && src !== null) {
if (typeof src == "object") { if (typeof src == "object") {
src = egw().link('/index.php', src); src = egw().link('/index.php', src);

View File

@ -124,8 +124,8 @@ class et2_image extends et2_baseWidget implements et2_IDetachedDOM
if (typeof _attrs["src"] != "undefined") if (typeof _attrs["src"] != "undefined")
{ {
let manager = this.getArrayMgr("content"); let manager = this.getArrayMgr("content");
if(manager) { if(manager && _attrs["src"]) {
let src = manager.getEntry(_attrs["src"]); let src = manager.getEntry(_attrs["src"], false, true);
if (typeof src != "undefined" && src !== null) if (typeof src != "undefined" && src !== null)
{ {
if(typeof src == "object") if(typeof src == "object")