From 8988541b62f3de74464da019208237d9d61bea7e Mon Sep 17 00:00:00 2001 From: NullVoxPopuli Date: Fri, 27 Mar 2020 13:33:26 -0400 Subject: [PATCH] fix(config): normalizeConfig broke --- lib/rules/decorator-position.js | 6 ++++++ smoke-tests/ember/general.js | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/lib/rules/decorator-position.js b/lib/rules/decorator-position.js index ea8b9b2f..df7d4711 100644 --- a/lib/rules/decorator-position.js +++ b/lib/rules/decorator-position.js @@ -179,6 +179,9 @@ function positionDecorator(context, node, options) { function placeDecoratorsBesideProperty(context, node, options) { for (const decoratorConfig of options.overrides[PREFER_INLINE]) { + if (!decoratorConfig) { + continue; + } const config = normalizeConfig(decoratorConfig, INTENT.SAME_LINE); const info = decoratorInfo(node, config); @@ -206,6 +209,9 @@ function placeDecoratorsBesideProperty(context, node, options) { function placeDecoratorsAboveProperty(context, node, options) { for (const decoratorConfig of options.overrides[ABOVE]) { + if (!decoratorConfig) { + continue; + } const config = normalizeConfig(decoratorConfig, INTENT.DIFFERENT_LINES); const info = decoratorInfo(node, config); diff --git a/smoke-tests/ember/general.js b/smoke-tests/ember/general.js index 92651be2..5a0adbf7 100644 --- a/smoke-tests/ember/general.js +++ b/smoke-tests/ember/general.js @@ -13,4 +13,9 @@ export class Foo { @hasMany('relation', { someConfig: true, }) relationship; + + @(task(function* () { + // some task + }).drop()) + someTask; }