mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 01:41:22 +01:00
fix(#943): don't convert ocean pattern image to base64 if pattern is toggled off
This commit is contained in:
parent
50a9411882
commit
44b486c101
3 changed files with 9 additions and 7 deletions
|
|
@ -240,12 +240,14 @@ async function getMapURL(type, options = {}) {
|
|||
if (location.hostname && cloneEl.getElementById("oceanicPattern")) {
|
||||
const el = cloneEl.getElementById("oceanicPattern");
|
||||
const url = el.getAttribute("href");
|
||||
await new Promise(resolve => {
|
||||
getBase64(url, base64 => {
|
||||
el.setAttribute("href", base64);
|
||||
resolve();
|
||||
if (url) {
|
||||
await new Promise(resolve => {
|
||||
getBase64(url, base64 => {
|
||||
el.setAttribute("href", base64);
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// add relief icons
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue