Fix an 'undefined' variable error in the drive

pull/1/head
yflory 8 years ago
parent c9d89debba
commit 80115d0071

@ -1871,6 +1871,7 @@ define([
var $truncated = $('<span>', {'class': 'truncated'}).text('...'); var $truncated = $('<span>', {'class': 'truncated'}).text('...');
$content.find('.element').each(function (idx, el) { $content.find('.element').each(function (idx, el) {
var $name = $(el).find('.name'); var $name = $(el).find('.name');
if ($name.length === 0) { return; }
if ($name[0].scrollHeight > $name[0].clientHeight) { if ($name[0].scrollHeight > $name[0].clientHeight) {
var $tr = $truncated.clone(); var $tr = $truncated.clone();
$tr.attr('title', $name.attr('title')); $tr.attr('title', $name.attr('title'));

Loading…
Cancel
Save