Changed pass.json props patching

This commit is contained in:
Alexander Cerutti
2019-06-12 23:26:44 +02:00
parent 9ed541dca7
commit 5213b5e190

View File

@@ -517,9 +517,9 @@ export class Pass implements PassIndexSignature {
.forEach(v => delete this._props[v]); .forEach(v => delete this._props[v]);
Object.keys(this._props).forEach(prop => { Object.keys(this._props).forEach(prop => {
if (passFile[prop] instanceof Array) { if (passFile[prop] && passFile[prop] instanceof Array) {
passFile[prop].push(...this._props[prop]); passFile[prop].push(...this._props[prop]);
} else if (passFile[prop] instanceof Object) { } else if (passFile[prop] && passFile[prop] instanceof Object) {
Object.assign(passFile[prop], this._props[prop]); Object.assign(passFile[prop], this._props[prop]);
} else { } else {
passFile[prop] = this._props[prop]; passFile[prop] = this._props[prop];