This commit is contained in:
2025-12-01 03:09:26 +02:00
parent 05e6358326
commit b17c779cfa
3 changed files with 5 additions and 14 deletions
+1 -13
View File
@@ -11,19 +11,7 @@ export class AppendOptions {
}
if (typeof data === 'string') {
if (data == '{}') {
return this;
}
data.slice(1).slice(0, -1).split(',').forEach(function(token) {
let option = token.split(':').map(function(a) {
return a.slice(1).slice(0, -1);
});
target.append(new Option(option[1], option[0]));
});
Object.entries(JSON.parse(data.countries)).forEach(([k, v]) => target.append(new Option(v, k)));
}
else {