Include organized field in merge dialog (#3565)

This commit is contained in:
WithoutPants
2023-03-22 10:54:45 +11:00
committed by GitHub
parent fc7c3f588e
commit fcfbdc47bc
2 changed files with 41 additions and 2 deletions

View File

@@ -36,10 +36,11 @@ export class ScrapeResult<T> {
) {
this.originalValue = originalValue ?? undefined;
this.newValue = newValue ?? undefined;
const hasNewValue = newValue !== undefined;
const valuesEqual = isEqual(originalValue, newValue);
this.useNewValue = useNewValue ?? (!!this.newValue && !valuesEqual);
this.scraped = !!this.newValue && !valuesEqual;
this.useNewValue = useNewValue ?? (hasNewValue && !valuesEqual);
this.scraped = hasNewValue && !valuesEqual;
}
public setOriginalValue(value?: T) {