Add missing deps, fix errors from eslint

This commit is contained in:
Viktor Denisov
2022-12-16 11:14:19 -08:00
parent 2cba776dc8
commit 6fa827823c
21 changed files with 483 additions and 229 deletions

View File

@@ -1,16 +1,15 @@
import {Env} from "./utils/env";
import {createMapScript} from "./utils/create-map-script";
import { Env } from './utils/env'
import { createMapScript } from './utils/create-map-script'
let isApiSetUp = false
export function loadGMapApi (options) {
export function loadGMapApi(options) {
if (Env.isServer()) {
return;
return
}
if (!isApiSetUp) {
isApiSetUp = true
const googleMapScript = createMapScript(options);
const googleMapScript = createMapScript(options)
document.head.appendChild(googleMapScript)
} else {
throw new Error('You already started the loading of google maps')