nedap server: gracefully handle missing backend
This commit is contained in:
parent
9774738066
commit
4bf35a0dbd
|
@ -44,7 +44,8 @@ var updateBackendTimeout;
|
||||||
function updateBackend() {
|
function updateBackend() {
|
||||||
if (!updateBackendTimeout) {
|
if (!updateBackendTimeout) {
|
||||||
updateBackendTimeout = setTimeout(function() {
|
updateBackendTimeout = setTimeout(function() {
|
||||||
backend.sendUTF(JSON.stringify({ scores: scores }));
|
if (backend)
|
||||||
|
backend.sendUTF(JSON.stringify({ scores: scores }));
|
||||||
updateBackendTimeout = undefined;
|
updateBackendTimeout = undefined;
|
||||||
}, 50);
|
}, 50);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user