Fixes to the personal theme

This commit is contained in:
Pieter Vander Vennet 2020-09-15 02:29:31 +02:00
parent ce1568f2bb
commit 9e6460030b
11 changed files with 126 additions and 102 deletions

View file

@ -65,17 +65,16 @@ export class OsmPreferences {
source.setData(undefined);
return;
}
if (l > 25) {
const prefsCount = Number(l);
if (prefsCount > 100) {
throw "Length to long";
}
const prefsCount = Number(l);
let str = "";
for (let i = 0; i < prefsCount; i++) {
str += self.GetPreference(allStartWith + "-" + i, "").data;
}
source.setData(str);
source.ping();
console.log("Long preference", key, "has", str.length, "chars");
}