diff --git a/www/media/main.js b/www/media/main.js index bd1764f9c..81820f8c0 100644 --- a/www/media/main.js +++ b/www/media/main.js @@ -41,9 +41,9 @@ define([ }; var updateTitle = function (newTitle) { - document.title = newTitle; - $bar.find('.' + Toolbar.constants.title).find('span.title').text(data); - $bar.find('.' + Toolbar.constants.title).find('input').val(data); + var title = document.title = newTitle; + $bar.find('.' + Toolbar.constants.title).find('span.title').text(title); + $bar.find('.' + Toolbar.constants.title).find('input').val(title); }; var suggestName = function () {