fix bug when input field has whitespace

This commit is contained in:
Oliver Gorwits
2013-09-22 14:33:36 +01:00
parent 0481d4f731
commit 79591e3998

View File

@@ -20,8 +20,8 @@
// browser
function update_page_title (tab) {
var pgtitle = 'Netdisco';
if ($('#nd_device-name').text().length) {
var pgtitle = $('#nd_device-name').text() +' - '+ $('#'+ tab + '_link').text();
if ($.trim($('#nd_device-name').text()).length) {
pgtitle = $.trim($('#nd_device-name').text()) +' - '+ $('#'+ tab + '_link').text();
}
return pgtitle;
}