Use @utils instead of jQuery

This commit is contained in:
Paul Chavard 2018-10-09 11:35:22 +02:00
parent c343893d00
commit 8c16eb4cd0
6 changed files with 17 additions and 24 deletions

View file

@ -1,5 +1,5 @@
import $ from 'jquery';
import L from 'leaflet';
import { getJSON } from '@utils';
import { getData } from '../shared/data';
import { DEFAULT_POSITION } from '../shared/carto';
@ -11,8 +11,8 @@ import {
} from './carto/draw';
function initialize() {
if ($('#map').length > 0) {
$.getJSON(getData('carto').getPositionUrl).then(
if (document.getElementById('map')) {
getJSON(getData('carto').getPositionUrl).then(
position => initializeWithPosition(position),
() => initializeWithPosition(DEFAULT_POSITION)
);