Chore: Fix bunch of strict null error to fix master CI (#23443)
* Fix bunch of null error * Fix failing test * Another test fix
This commit is contained in:
@@ -38,7 +38,7 @@ export class PanelPlugin<TOptions = any, TFieldConfigOptions extends object = an
|
||||
private _optionEditors?: PanelOptionEditorsRegistry;
|
||||
private registerOptionEditors?: (builder: PanelOptionsEditorBuilder<TOptions>) => void;
|
||||
|
||||
panel: ComponentType<PanelProps<TOptions>>;
|
||||
panel: ComponentType<PanelProps<TOptions>> | null;
|
||||
editor?: ComponentClass<PanelEditorProps<TOptions>>;
|
||||
onPanelMigration?: PanelMigrationHandler<TOptions>;
|
||||
onPanelTypeChanged?: PanelTypeChangedHandler<TOptions>;
|
||||
@@ -49,7 +49,7 @@ export class PanelPlugin<TOptions = any, TFieldConfigOptions extends object = an
|
||||
*/
|
||||
angularPanelCtrl?: any;
|
||||
|
||||
constructor(panel: ComponentType<PanelProps<TOptions>>) {
|
||||
constructor(panel: ComponentType<PanelProps<TOptions>> | null) {
|
||||
super();
|
||||
this.panel = panel;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ export function findCommonLabels(labelsSets: Labels[]): Labels {
|
||||
/**
|
||||
* Returns a map of labels that are in `labels`, but not in `commonLabels`.
|
||||
*/
|
||||
export function findUniqueLabels(labels: Labels, commonLabels: Labels): Labels {
|
||||
export function findUniqueLabels(labels: Labels | undefined, commonLabels: Labels): Labels {
|
||||
const uncommonLabels: Labels = { ...labels };
|
||||
Object.keys(commonLabels).forEach(key => {
|
||||
delete uncommonLabels[key];
|
||||
|
||||
Reference in New Issue
Block a user