Skip to content

Commit af5e77e

Browse files
committed
using . for object fields
1 parent 06f2b37 commit af5e77e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib_src/misc/colors.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ export function getColors(selectors) {
2020
// wait till rendered?
2121
for (const style in selectors) {
2222
try {
23-
color[style] = rgb2hex(window.getComputedStyle(styled[style])['color'])
23+
color[style] = rgb2hex(window.getComputedStyle(styled[style]).color)
2424
} catch (e) {
2525
console.error(e)
2626
}
2727
}
28-
color['background'] = rgb2hex(window.getComputedStyle(div)['backgroundColor'])
28+
color.background = rgb2hex(window.getComputedStyle(div).backgroundColor)
2929
document.body.removeChild(div)
3030

3131
return color

0 commit comments

Comments
 (0)