forked from MapComplete/MapComplete
Fix: MC would crash if a pending change was present; remember preferences in order to reuse the changeset
This commit is contained in:
parent
6760897a6f
commit
f2375f4877
6 changed files with 291 additions and 261 deletions
|
@ -558,19 +558,8 @@ export class Changes {
|
|||
const successes = await Promise.all(
|
||||
Array.from(pendingPerTheme, async ([theme, pendingChanges]) => {
|
||||
try {
|
||||
const openChangeset = this.state.osmConnection
|
||||
.GetPreference("current-open-changeset-" + theme)
|
||||
.sync(
|
||||
(str) => {
|
||||
const n = Number(str)
|
||||
if (isNaN(n)) {
|
||||
return undefined
|
||||
}
|
||||
return n
|
||||
},
|
||||
[],
|
||||
(n) => "" + n
|
||||
)
|
||||
const openChangeset = UIEventSource.asInt(this.state.osmConnection
|
||||
.GetPreference("current-open-changeset-" + theme))
|
||||
console.log(
|
||||
"Using current-open-changeset-" +
|
||||
theme +
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue