Skip to content

Commit 65a36d3

Browse files
adamxp12DaneEveritt
authored andcommitted
Fix console not loading sometimes (pterodactyl#710)
1 parent b5ff41e commit 65a36d3

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.
3636
* Attempting to create a server when no nodes are configured now redirects to the node creation page.
3737
* Fixes missing library issue for teamspeak when used with mariadb.
3838
* Fixes inability to change the default port on front-end when viewing a server.
39-
* Fixes bug preventing deletion of nests that have other nests referencing them as children.
39+
* Fixes bug preventing deletion of nests that have other nests referencing them as children.
40+
* Fixes console sometimes not loading properly on slow connections
4041

4142
### Removed
4243
* SFTP settings page now only displays connection address and username. Password setting was removed as it is no longer necessary with Daemon changes.

public/themes/pterodactyl/js/frontend/console.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,11 @@ function pushToTerminal(string) {
203203
});
204204

205205
Socket.on('console', function (data) {
206-
data.line.split(/\n/g).forEach(function (item) {
207-
TerminalQueue.push(item);
208-
});
206+
if(data.line) {
207+
data.line.split(/\n/g).forEach(function (item) {
208+
TerminalQueue.push(item);
209+
});
210+
}
209211
});
210212
})();
211213

0 commit comments

Comments
 (0)