Small JS nits.

This commit is contained in:
Sascha L. Teichmann 2015-03-04 12:10:07 +01:00
parent c32e2646af
commit 446a3ddc10
2 changed files with 2 additions and 2 deletions

View File

@ -96,7 +96,7 @@ L.control.coordinates({
}).addTo(map); }).addTo(map);
var manualUpdateControl; var manualUpdateControl;
if (window.WebSocket && useWebsocket) { if (useWebsocket && 'WebSocket' in window) {
L.autoUpdate('autoUpdate', function(pressed) { L.autoUpdate('autoUpdate', function(pressed) {
if (pressed) { if (pressed) {
manualUpdateControl.getContainer().style = 'visibility: hidden'; manualUpdateControl.getContainer().style = 'visibility: hidden';

View File

@ -45,7 +45,7 @@ L.Control.AutoUpdate = L.Control.extend({
this.socket.onmessage = function(evt) { this.socket.onmessage = function(evt) {
var invalidate = function(json) { var invalidate = function(json) {
var invalidateAll = function(x, y, z) { return true }; var invalidateAll = function(x, y, z) { return true; };
if (!(typeof json === "string")) { if (!(typeof json === "string")) {
return invalidateAll; return invalidateAll;