File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,8 @@ export class TextField implements BaseTextField {
6868 * @param source See {@code Source}
6969 */
7070 public sourceValidity ( source : Source ) : CheckResult {
71- return this . validityList . find ( sv => sv . source === source ) ?. status || CheckResult . WAS_NOT_DONE
71+ const status = this . validityList . find ( sv => sv . source === source ) ?. status ;
72+ return this . statusOrNotDone ( status )
7273 }
7374
7475 /**
@@ -80,6 +81,13 @@ export class TextField implements BaseTextField {
8081 return ( sv . sourceLeft === one && sv . sourceRight === other )
8182 || ( sv . sourceLeft === other && sv . sourceRight === one ) ;
8283 } )
83- return comparison ?. status || CheckResult . WAS_NOT_DONE
84+ return this . statusOrNotDone ( comparison ?. status )
85+ }
86+
87+ /**
88+ * Returns not done status in case of missing status value.
89+ */
90+ private statusOrNotDone ( status : CheckResult | undefined ) : CheckResult {
91+ return status === undefined ? CheckResult . WAS_NOT_DONE : status
8492 }
8593}
You can’t perform that action at this time.
0 commit comments