Prevent drawing while disconnected

This commit is contained in:
Oswaldo Acauan 2018-06-26 10:28:58 -03:00
parent e541e68379
commit 03a18b85b1

View File

@ -131,6 +131,9 @@ const proccessAnnotationsQueue = () => {
};
export function sendAnnotation(annotation) {
// Prevent sending annotations while disconnected
if (!Meteor.status().connected) return;
annotationsQueue.push(annotation);
if (!annotationsSenderIsRunning) setTimeout(proccessAnnotationsQueue, annotationsBufferTimeMin);