Fix generateLayerOverviews
This commit is contained in:
parent
98c40822a2
commit
8ae679d075
2 changed files with 7 additions and 3 deletions
|
@ -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,
|
||||
|
|
|
@ -307,6 +307,10 @@ class ExpandRewrite<T> extends Conversion<T | RewritableConfigJson<T>, T[]> {
|
|||
|
||||
convert(json: T | RewritableConfigJson<T>, context: string): { result: T[]; errors?: string[]; warnings?: string[]; information?: string[] } {
|
||||
|
||||
if(json === null || json === undefined){
|
||||
return {result: []}
|
||||
}
|
||||
|
||||
if (json["rewrite"] === undefined) {
|
||||
|
||||
// not a rewrite
|
||||
|
|
Loading…
Reference in a new issue