fix: Use correct method name for string replacement

This commit is contained in:
oSumAtrIX
2023-11-04 22:41:18 +01:00
parent e1c6f65b7e
commit 494e268bc5

View File

@ -73,11 +73,14 @@ class Option {
static void _migrateV17ToV19(Map<String, dynamic> json) { static void _migrateV17ToV19(Map<String, dynamic> json) {
if (json['valueType'] == null) { if (json['valueType'] == null) {
json['valueType'] = json['optionClassType'] final type = json['optionClassType'];
.replace('PatchOption', '') if (type is String) {
.replace('List', 'Array'); json['valueType'] = type
.replaceAll('PatchOption', '')
.replaceAll('List', 'Array');
json['optionClassType'] = null; json['optionClassType'] = null;
}
} }
} }