From 2c11eb90d4e3d36d74dab199b5846db6c459ad0b Mon Sep 17 00:00:00 2001 From: Andrew Henry Date: Mon, 29 Apr 2019 19:18:27 -0700 Subject: [PATCH] Add additional check for presence of configuration attribute (#2393) --- src/plugins/objectMigration/Migrations.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/plugins/objectMigration/Migrations.js b/src/plugins/objectMigration/Migrations.js index cc035096b6..4855218e5b 100644 --- a/src/plugins/objectMigration/Migrations.js +++ b/src/plugins/objectMigration/Migrations.js @@ -177,7 +177,9 @@ define([ return [ { check(domainObject) { - return domainObject.type === 'layout' && domainObject.configuration.layout; + return domainObject.type === 'layout' && + domainObject.configuration && + domainObject.configuration.layout; }, migrate(domainObject) { let childObjects = {}; @@ -196,7 +198,9 @@ define([ }, { check(domainObject) { - return domainObject.type === 'telemetry.fixed' && domainObject.configuration['fixed-display']; + return domainObject.type === 'telemetry.fixed' && + domainObject.configuration && + domainObject.configuration['fixed-display']; }, migrate(domainObject) { const DEFAULT_GRID_SIZE = [64, 16]; @@ -234,6 +238,7 @@ define([ { check(domainObject) { return domainObject.type === 'table' && + domainObject.configuration && domainObject.configuration.table; }, migrate(domainObject) {