Small optimazations

This commit is contained in:
pietervdvn 2021-07-26 15:03:07 +02:00
parent cc22c5b0fb
commit 5cc963513a
4 changed files with 7 additions and 3 deletions

View file

@ -265,7 +265,7 @@ export class Changes {
console.log("No changes to be made") console.log("No changes to be made")
this.pendingChanges.setData([]) this.pendingChanges.setData([])
this.isUploading.setData(false) this.isUploading.setData(false)
return; return true; // Unregister the callback
} }
@ -280,6 +280,7 @@ export class Changes {
}, },
() => self.isUploading.setData(false) // Failed - mark to try again () => self.isUploading.setData(false) // Failed - mark to try again
) )
return true;
}); });

View file

@ -53,6 +53,9 @@ export class ChangesetHandler {
element.ping(); element.ping();
} }
const newVersion = parseInt(node.attributes.new_id.value);
} }
} }

View file

@ -184,7 +184,7 @@ export class UIEventSource<T> {
addCallbackAndRunD(callback: (data: T) => void) { addCallbackAndRunD(callback: (data: T) => void) {
this.addCallbackAndRun(data => { this.addCallbackAndRun(data => {
if (data !== undefined && data !== null) { if (data !== undefined && data !== null) {
callback(data) return callback(data)
} }
}) })
} }

View file

@ -2,7 +2,7 @@ import { Utils } from "../Utils";
export default class Constants { export default class Constants {
public static vNumber = "0.8.5-rc1"; public static vNumber = "0.8.5-rc2";
// The user journey states thresholds when a new feature gets unlocked // The user journey states thresholds when a new feature gets unlocked
public static userJourney = { public static userJourney = {