Fix error when no map-canvas on page