Skip to content

Commit 487cfe6

Browse files
authored
Merge pull request #70 from regulaforensics/fix/fe-697
FE-697 - fix types
2 parents 95289d4 + 208c790 commit 487cfe6

File tree

1 file changed

+21
-19
lines changed

1 file changed

+21
-19
lines changed

src/ext/text-field.ts

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -169,16 +169,16 @@ export class TextField implements BaseTextField {
169169
comparisonList: Array<CrossSourceValueComparison>;
170170

171171
constructor(origin: BaseTextField) {
172-
this.fieldType = origin.fieldType
173-
this.fieldName = origin.fieldName
174-
this.lcid = origin.lcid
175-
this.status = origin.status
176-
this.validityStatus = origin.validityStatus
177-
this.comparisonStatus = origin.comparisonStatus
178-
this.value = origin.value
179-
this.valueList = origin.valueList
180-
this.validityList = origin.validityList
181-
this.comparisonList = origin.comparisonList
172+
this.fieldType = origin.fieldType;
173+
this.fieldName = origin.fieldName;
174+
this.lcid = origin.lcid;
175+
this.status = origin.status;
176+
this.validityStatus = origin.validityStatus;
177+
this.comparisonStatus = origin.comparisonStatus;
178+
this.value = origin.value;
179+
this.valueList = origin.valueList;
180+
this.validityList = origin.validityList;
181+
this.comparisonList = origin.comparisonList;
182182
}
183183

184184
/**
@@ -203,9 +203,9 @@ export class TextField implements BaseTextField {
203203

204204
const value = this.getValueBySource(source)
205205
if (original) {
206-
return value?.originalValue
206+
return value?.originalValue;
207207
}
208-
return value?.value
208+
return value?.value;
209209
}
210210

211211
/**
@@ -215,10 +215,10 @@ export class TextField implements BaseTextField {
215215
public sourceValidity(source: Source): CheckResult {
216216
for (const validity of this.validityList) {
217217
if (validity.source === source) {
218-
return validity.status
218+
return validity.status;
219219
}
220220
}
221-
return CheckResult.WAS_NOT_DONE
221+
return CheckResult.WAS_NOT_DONE;
222222
}
223223

224224
/**
@@ -227,22 +227,24 @@ export class TextField implements BaseTextField {
227227
public crossSourceComparison(one: Source, other: Source): CheckResult {
228228
for (const c of this.comparisonList) {
229229
if ((c.sourceLeft === one && c.sourceRight === other) || (c.sourceLeft === other && c.sourceRight === one)) {
230-
return c.status
230+
return c.status;
231231
}
232232
}
233-
return CheckResult.WAS_NOT_DONE
233+
return CheckResult.WAS_NOT_DONE;
234234
}
235235

236236
public getLCIDName(): string | undefined {
237-
return LCID_MAP[this.lcid] || String(this.lcid);
237+
if (this.lcid) {
238+
return LCID_MAP[this.lcid] || String(this.lcid);
239+
}
238240
}
239241

240242
private getValueBySource(source: Source): TextFieldValue | undefined {
241243
for (const value of this.valueList) {
242244
if (value.source == source) {
243-
return value
245+
return value;
244246
}
245247
}
246-
return undefined
248+
return undefined;
247249
}
248250
}

0 commit comments

Comments
 (0)