Fix generateLayerOverviews

This commit is contained in:
Pieter Vander Vennet 2022-02-28 20:21:37 +01:00
parent 98c40822a2
commit 8ae679d075
2 changed files with 7 additions and 3 deletions

View file

@ -38,8 +38,8 @@ export abstract class Conversion<TIn, TOut> {
abstract convert(json: TIn, context: string): { result: TOut, errors?: string[], warnings?: string[], information?: string[] }
public convertAll(jsons: TIn[], context: string): { result: TOut[], errors: string[], warnings: string[], information?: string[] } {
if(jsons === undefined){
throw "convertAll received undefined - don't do this (at "+context+")"
if(jsons === undefined || jsons === null){
throw "convertAll received undefined or null - don't do this (at "+context+")"
}
const result = []
const errors = []
@ -105,7 +105,7 @@ export class OnEveryConcat<X, T> extends DesugaringStep<T> {
const step = this.step
const key = this.key;
const values = json[key]
if (values === undefined) {
if (values === undefined || values === null) {
// Move on - nothing to see here!
return {
result: json,