diff --git a/LICENSE b/LICENSE index fddd306..fa26b71 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License -Copyright (c) 2018 Paperbits. +Copyright (c) 2020 Paperbits. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/README.md b/README.md index eacf40d..40cbc1c 100644 --- a/README.md +++ b/README.md @@ -19,4 +19,4 @@ Paperbits is a library of reusable tools and components helping you build web ap ## License Use of this source code is governed by an MIT-style license that can be found in the LICENSE file at https://paperbits.io/license/mit. -2018 (c) Copyright Paperbits. All Rights Reserved. +2020 (c) Copyright Paperbits. All Rights Reserved. diff --git a/src/workshops/snippets/styleSnippetSelector.ts b/src/workshops/snippets/styleSnippetSelector.ts index bbc4404..7414396 100644 --- a/src/workshops/snippets/styleSnippetSelector.ts +++ b/src/workshops/snippets/styleSnippetSelector.ts @@ -100,15 +100,21 @@ export class StyleSnippetSelector { const defaultKey = `${parts[0]}/${parts[1]}/default`; const defaultItem = await this.styleSnippetService.getStyleByKey(defaultKey); const defaultKeys = this.getAllStyleKeys(defaultItem); + stylesKeys.push(... defaultKeys); } + const subTheme = {}; + stylesKeys = stylesKeys.filter((item, index, source) => source.indexOf(item) === index); + for (const stylesKey of stylesKeys) { const styleValue = await this.styleSnippetService.getStyleByKey(stylesKey); + if (styleValue) { this.mergeNestedObj(subTheme, stylesKey, styleValue); - } else { + } + else { console.warn("styleKey not found: ", stylesKey); } }