From 65a36d35b763d9b50b5b3e1fdd52e27ae5cdf8cf Mon Sep 17 00:00:00 2001 From: Adam Blunt Date: Tue, 31 Oct 2017 23:17:08 +0000 Subject: [PATCH] Fix console not loading sometimes (#710) --- CHANGELOG.md | 3 ++- public/themes/pterodactyl/js/frontend/console.js | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e44b65b9b..1affb69c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,7 +36,8 @@ This project follows [Semantic Versioning](http://semver.org) guidelines. * Attempting to create a server when no nodes are configured now redirects to the node creation page. * Fixes missing library issue for teamspeak when used with mariadb. * Fixes inability to change the default port on front-end when viewing a server. -* Fixes bug preventing deletion of nests that have other nests referencing them as children. +* Fixes bug preventing deletion of nests that have other nests referencing them as children. +* Fixes console sometimes not loading properly on slow connections ### Removed * SFTP settings page now only displays connection address and username. Password setting was removed as it is no longer necessary with Daemon changes. diff --git a/public/themes/pterodactyl/js/frontend/console.js b/public/themes/pterodactyl/js/frontend/console.js index d1bc53c81..d96aaefd4 100644 --- a/public/themes/pterodactyl/js/frontend/console.js +++ b/public/themes/pterodactyl/js/frontend/console.js @@ -203,9 +203,11 @@ function pushToTerminal(string) { }); Socket.on('console', function (data) { - data.line.split(/\n/g).forEach(function (item) { - TerminalQueue.push(item); - }); + if(data.line) { + data.line.split(/\n/g).forEach(function (item) { + TerminalQueue.push(item); + }); + } }); })();