Catch potential undefined result.

This commit is contained in:
Dane Everitt 2017-03-31 23:37:46 -04:00
parent edaa270a33
commit 482bf4804d
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53

View file

@ -19,6 +19,10 @@
// SOFTWARE.
$(document).ready(function () {
Socket.on('console', function (data) {
if (typeof data === 'undefined' || typeof data.line === 'undefined') {
return;
}
if (~data.line.indexOf('You need to agree to the EULA in order to run the server')) {
swal({
title: 'EULA Acceptance',