fix exception for not found image / null passed

This commit is contained in:
Ralf Becker 2014-02-10 09:16:18 +00:00
parent 486303cde5
commit 1f599abaf6

View File

@ -141,7 +141,7 @@ egw.extend('images', egw.MODULE_GLOBAL, function() {
image_element: function(_url, _alt) image_element: function(_url, _alt)
{ {
var icon; var icon;
if (_url.match(/\.svg$/)) if (typeof _url == 'string' && _url.match(/\.svg$/))
{ {
icon = document.createElement('object'); icon = document.createElement('object');
icon.type = 'image/svg+xml'; icon.type = 'image/svg+xml';