From 1c270924fcbb077943956d0eca2e48f530a454ea Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 4 Mar 2019 17:35:17 +0100 Subject: [PATCH] FIX a bug with animations not being stringify-able --- lib/theming/src/create.ts | 2 +- lib/theming/src/ensure.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/theming/src/create.ts b/lib/theming/src/create.ts index b9bc4aef28e0..4e2fe16e9167 100644 --- a/lib/theming/src/create.ts +++ b/lib/theming/src/create.ts @@ -126,7 +126,7 @@ export const create = (vars: ThemeVars = { base: 'light' }, rest?: Rest): Theme // Toolbar default/active colors barTextColor: inherit.barTextColor, - barSelectedColor: inherit.barSelectedColor, + barSelectedColor: vars.barSelectedColor || inherit.colorSecondary, barBg: inherit.barBg, // Brand logo/text diff --git a/lib/theming/src/ensure.ts b/lib/theming/src/ensure.ts index 70fe47718127..f053ca1742c2 100644 --- a/lib/theming/src/ensure.ts +++ b/lib/theming/src/ensure.ts @@ -38,6 +38,7 @@ export const ensure = (input: any): Theme => { if (!input) { return light; } else { + // debugger; const missing = deletedDiff(base, input); if (Object.keys(missing).length) { logger.warn( @@ -50,6 +51,6 @@ export const ensure = (input: any): Theme => { ); } - return merge(light, input); + return merge(light, { ...input, animation: light.animation }); } };