updates
This commit is contained in:
@@ -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 {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user