[FIX] problem with previous improvement, make some views crash

bzr revid: nicolas.vanhoren@openerp.com-20120711124731-mgn9028814kj9esn
This commit is contained in:
niv-openerp 2012-07-11 14:47:31 +02:00
parent 7cf43beab7
commit fad2a1345b
1 changed files with 1 additions and 1 deletions

View File

@ -750,7 +750,7 @@ instance.web_kanban.KanbanRecord = instance.web.OldWidget.extend({
// Set the cache duration in seconds.
url += '&cache=' + parseInt(cache, 10);
}
if (this.record[field].value && ! /^\d+(\.\d*)? \w+$/.test(this.record[field].value)) {
if (this.record[field] && this.record[field].value && ! /^\d+(\.\d*)? \w+$/.test(this.record[field].value)) {
url = 'data:image/png;base64,' + this.record[field].value;
}
return url;