Chore: reduce null check errors/warnigns (#25223)

* fix a few null errors

* more

* flip logic

* merge master

* more

* fewer changes

* processor

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
This commit is contained in:
Ryan McKinley
2020-07-03 17:49:29 +02:00
committed by GitHub
co-authored by Torkel Ödegaard
parent 26852ca788
commit c0762b6ddc
8 changed files with 60 additions and 48 deletions
@@ -53,15 +53,15 @@ export class DataFrameView<T = any> extends FunctionalVector<T> {
* Helper function to return the {@link DisplayProcessor} for a given field column.
* @param colIndex - the field column index for the data frame.
*/
getFieldDisplayProcessor(colIndex: number): DisplayProcessor | null {
getFieldDisplayProcessor(colIndex: number): DisplayProcessor | undefined {
if (!this.dataFrame || !this.dataFrame.fields) {
return null;
return undefined;
}
const field = this.dataFrame.fields[colIndex];
if (!field || !field.display) {
return null;
return undefined;
}
return field.display;