From 097d793aecad26c4d8e95dcc8b9bab2fa56ae205 Mon Sep 17 00:00:00 2001 From: lonyele Date: Tue, 16 Apr 2019 00:34:02 +0900 Subject: [PATCH] Fix deprecationThemeOptions always override final brand object with undefined and null --- lib/api/src/modules/layout.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/api/src/modules/layout.ts b/lib/api/src/modules/layout.ts index e1c8670788d7..8fdddd4151ad 100644 --- a/lib/api/src/modules/layout.ts +++ b/lib/api/src/modules/layout.ts @@ -116,7 +116,7 @@ const applyDeprecatedLayoutOptions = deprecate((options: Options): PartialLayout }, deprecationMessage(deprecatedLayoutOptions)); const checkDeprecatedThemeOptions = (options: Options) => { - if (Object.values(deprecatedThemeOptions).find(v => !!v)) { + if (Object.keys(deprecatedThemeOptions).find((k: 'name' | 'url') => !!options[k])) { return applyDeprecatedThemeOptions(options); } return {};