Skip to content

Commit 47c66a2

Browse files
committed
fix: fix error
1 parent 88e6160 commit 47c66a2

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# CHANGELOG
2-
## 3.13.23 | 2022.04.21
2+
## 3.13.24 | 2022.04.21
33
- Fix theme config array merge bug [#713](https://github.com/Binaryify/OneDark-Pro/issues/713)
44

55
## 3.13.22 | 2022.04.21

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "material-theme",
33
"displayName": "One Dark Pro",
44
"description": "Atom‘s iconic One Dark theme for Visual Studio Code",
5-
"version": "3.13.23",
5+
"version": "3.13.24",
66
"publisher": "zhuangtongfa",
77
"license": "MIT",
88
"bugs": {

src/themes/Theme.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
import { Colors, ThemeConfiguration, TokenColor } from '../interface'
22
import data from './themeData'
3-
import { uniqBy } from 'lodash'
43
async function createEditorTokens(config: ThemeConfiguration) {
54
return config.editorTheme in data.editorThemes
65
? (await data.editorThemes[config.editorTheme]()).default
76
: (await data.editorThemes['One Dark Pro']()).default
87
}
8+
const uniqBy = (arr, fn, set = new Set()) =>
9+
arr.filter((el) =>
10+
((v) => !set.has(v) && set.add(v))(
11+
typeof fn === 'function' ? fn(el) : el[fn]
12+
)
13+
)
914

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

0 commit comments

Comments
 (0)