Fix generation of docs by injecting dependency

This commit is contained in:
Pieter Vander Vennet 2021-03-22 02:45:22 +01:00
parent a4445eed3e
commit 59d53e5ec5
3 changed files with 34 additions and 16 deletions

View file

@ -11,6 +11,15 @@ import State from "./State";
import Combine from "./UI/Base/Combine";
import Translations from "./UI/i18n/Translations";
import CountryCoder from "latlon2country"
import MetaTagging from "./Logic/MetaTagging";
// Workaround for a stupid crash: inject the function
MetaTagging.coder = new CountryCoder("https://pietervdvn.github.io/latlon2country/");
let defaultLayout = ""
// --------------------- Special actions based on the parameters -----------------
// @ts-ignore
@ -73,7 +82,7 @@ if (layoutFromBase64.startsWith("http")) {
$.ajax({
url: link,
success: function (data) {
try {
const parsed = JSON.parse(data);
// Overwrite the id to the wiki:value