Merge pull request #589 from BlipRanger/feature/tags

Tag, Author, Author Notes Import Support
This commit is contained in:
Cohee
2023-06-29 12:24:18 +03:00
committed by GitHub
5 changed files with 67 additions and 2 deletions

View File

@@ -783,6 +783,7 @@ function readFromV2(char) {
mes_example: 'mes_example',
talkativeness: 'extensions.talkativeness',
fav: 'extensions.fav',
tags: 'tags',
};
_.forEach(fieldMappings, (v2Path, charField) => {
@@ -808,7 +809,7 @@ function readFromV2(char) {
return;
}
}
if (!_.isUndefined(char[charField]) && !_.isUndefined(v2Value) && char[charField] !== v2Value) {
if (!_.isUndefined(char[charField]) && !_.isUndefined(v2Value) && String(char[charField]) !== String(v2Value)) {
console.debug(`Spec v2 data mismatch with Spec v1 for field: ${charField}`, char[charField], v2Value);
}
char[charField] = v2Value;