Skip to content

Commit

Permalink
fix: fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
Binaryify committed Apr 21, 2022
1 parent 88e6160 commit 47c66a2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# CHANGELOG
## 3.13.23 | 2022.04.21
## 3.13.24 | 2022.04.21
- Fix theme config array merge bug [#713](https://github.com/Binaryify/OneDark-Pro/issues/713)

## 3.13.22 | 2022.04.21
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "material-theme",
"displayName": "One Dark Pro",
"description": "Atom‘s iconic One Dark theme for Visual Studio Code",
"version": "3.13.23",
"version": "3.13.24",
"publisher": "zhuangtongfa",
"license": "MIT",
"bugs": {
Expand Down
7 changes: 6 additions & 1 deletion src/themes/Theme.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
import { Colors, ThemeConfiguration, TokenColor } from '../interface'
import data from './themeData'
import { uniqBy } from 'lodash'
async function createEditorTokens(config: ThemeConfiguration) {
return config.editorTheme in data.editorThemes
? (await data.editorThemes[config.editorTheme]()).default
: (await data.editorThemes['One Dark Pro']()).default
}
const uniqBy = (arr, fn, set = new Set()) =>
arr.filter((el) =>
((v) => !set.has(v) && set.add(v))(
typeof fn === 'function' ? fn(el) : el[fn]
)
)

function configFactory(configuration) {
let result: TokenColor[] = JSON.parse(
Expand Down

0 comments on commit 47c66a2

Please sign in to comment.