diff --git a/src/Logic/ImageProviders/AllImageProviders.ts b/src/Logic/ImageProviders/AllImageProviders.ts
index 96552b06d..8db2a8d01 100644
--- a/src/Logic/ImageProviders/AllImageProviders.ts
+++ b/src/Logic/ImageProviders/AllImageProviders.ts
@@ -91,7 +91,6 @@ export default class AllImageProviders {
However, we override them if a custom image tag is set, e.g. 'image:menu'
*/
const prefixes = tagKey ?? imageProvider.defaultKeyPrefixes
- console.log("Prefixes are", tagKey, prefixes)
const singleSource = tags.bindD((tags) => imageProvider.getRelevantUrls(tags, prefixes))
allSources.push(singleSource)
singleSource.addCallbackAndRunD((_) => {
diff --git a/src/Logic/Web/NameSuggestionIndex.ts b/src/Logic/Web/NameSuggestionIndex.ts
index 7133c1247..1560fd189 100644
--- a/src/Logic/Web/NameSuggestionIndex.ts
+++ b/src/Logic/Web/NameSuggestionIndex.ts
@@ -312,8 +312,8 @@ export default class NameSuggestionIndex {
}
const hasSpecial =
- i.locationSet.include?.some((i) => i.endsWith(".geojson") || Array.isArray(i)) ||
- i.locationSet.exclude?.some((i) => i.endsWith(".geojson") || Array.isArray(i))
+ i.locationSet.include?.some((i) => Array.isArray(i) || i.endsWith(".geojson")) ||
+ i.locationSet.exclude?.some((i) => Array.isArray(i) || i.endsWith(".geojson"))
if (!hasSpecial) {
return false
}
diff --git a/src/UI/Base/ToSvelte.svelte b/src/UI/Base/ToSvelte.svelte
index c6c742071..2828ef42c 100644
--- a/src/UI/Base/ToSvelte.svelte
+++ b/src/UI/Base/ToSvelte.svelte
@@ -29,6 +29,7 @@
html?.remove()
uiElement?.Destroy()
})
+
{#if isSvelte}
@@ -42,6 +43,6 @@
{:else}
{/if}
-{:else}
+{:else if elem !== undefined}
{/if}
diff --git a/src/UI/Popup/DeleteFlow/DeleteFlowState.ts b/src/UI/Popup/DeleteFlow/DeleteFlowState.ts
index 97bd82876..cfe7e8d72 100644
--- a/src/UI/Popup/DeleteFlow/DeleteFlowState.ts
+++ b/src/UI/Popup/DeleteFlow/DeleteFlowState.ts
@@ -43,14 +43,13 @@ export class DeleteFlowState {
console.log("Checking deleteability (internet?", useTheInternet, ")")
const t = Translations.t.delete
const id = this._id
- const self = this
if (!id.startsWith("node")) {
this.canBeDeleted.setData(false)
this.canBeDeletedReason.setData(t.isntAPoint)
return
}
- // Does the currently logged in user have enough experience to delete this point?
+ // Does the currently logged-in user have enough experience to delete this point?
const deletingPointsOfOtherAllowed = this._osmConnection.userDetails.map((ud) => {
if (ud === undefined) {
return undefined
@@ -74,10 +73,10 @@ export class DeleteFlowState {
// Not yet downloaded
return null
}
- const userId = self._osmConnection.userDetails.data.uid
+ const userId = this._osmConnection.userDetails.data.uid
return !previous.some((editor) => editor !== userId)
},
- [self._osmConnection.userDetails]
+ [this._osmConnection.userDetails]
)
// User allowed OR only edited by self?
@@ -96,14 +95,13 @@ export class DeleteFlowState {
if (allByMyself.data === null && useTheInternet) {
// We kickoff the download here as it hasn't yet been downloaded. Note that this is mapped onto 'all by myself' above
- const hist = this.objectDownloader
- .downloadHistory(id)
- .map((versions) =>
+ UIEventSource.FromPromise(this.objectDownloader
+ .downloadHistory(id))
+ .mapD((versions) =>
versions.map((version) =>
Number(version.tags["_last_edit:contributor:uid"])
)
- )
- hist.addCallbackAndRunD((hist) => previousEditors.setData(hist))
+ ).addCallbackAndRunD((hist) => previousEditors.setData(hist))
}
if (allByMyself.data === true) {
diff --git a/src/UI/Popup/TagRendering/Questionbox.svelte b/src/UI/Popup/TagRendering/Questionbox.svelte
index 83d21adfa..44515c746 100644
--- a/src/UI/Popup/TagRendering/Questionbox.svelte
+++ b/src/UI/Popup/TagRendering/Questionbox.svelte
@@ -12,7 +12,6 @@
import Translations from "../../i18n/Translations.js"
import { Utils } from "../../../Utils"
import { onDestroy } from "svelte"
- import TagRenderingQuestion from "./TagRenderingQuestion.svelte"
import TagRenderingQuestionDynamic from "./TagRenderingQuestionDynamic.svelte"
export let layer: LayerConfig
@@ -54,6 +53,7 @@
let skippedQuestions = new UIEventSource>(new Set())
let layerDisabledForTheme = state.userRelatedState.getThemeDisabled(state.theme.id, layer.id)
layerDisabledForTheme.addCallbackAndRunD((disabled) => {
+ console.log("Disabled questions are ", disabled)
skippedQuestions.set(new Set(disabled.concat(Array.from(skippedQuestions.data))))
})
let questionboxElem: HTMLDivElement
diff --git a/src/UI/Popup/TagRendering/SpecialTranslation.svelte b/src/UI/Popup/TagRendering/SpecialTranslation.svelte
index 417654a84..e83b647d1 100644
--- a/src/UI/Popup/TagRendering/SpecialTranslation.svelte
+++ b/src/UI/Popup/TagRendering/SpecialTranslation.svelte
@@ -49,9 +49,13 @@
function createVisualisation(specpart: Exclude): BaseUIElement {
{
try {
- return specpart.func
+ const uiEl = specpart.func
.constr(state, tags, specpart.args, feature, layer)
?.SetClass(specpart.style)
+ if (uiEl === undefined) {
+ console.error("Invalid special translation")
+ }
+ return uiEl
} catch (e) {
console.error(
"Could not construct a special visualisation with specification",