Skip to content

Commit 54952b5

Browse files
committed
Update style-to-object
1 parent 65d1908 commit 54952b5

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

lib/handlers/element.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,8 @@ import {
1414
start as identifierStart,
1515
cont as identifierCont
1616
} from 'estree-util-is-identifier-name'
17-
// @ts-expect-error: `style-to-object` doesn’t support actual ESM + TS correctly.
1817
import styleToObject from 'style-to-object'
1918

20-
/** @type {(value: string, iterator?: (property: string, value: string, declaration: unknown) => void) => Record<string, string>} */
21-
const style = styleToObject
22-
2319
const own = {}.hasOwnProperty
2420

2521
/**
@@ -185,7 +181,7 @@ function parseStyle(value, tagName) {
185181
const result = {}
186182

187183
try {
188-
style(value, iterator)
184+
styleToObject(value, iterator)
189185
} catch (error) {
190186
const exception = /** @type {Error} */ (error)
191187
exception.message =

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"mdast-util-mdxjs-esm": "^1.0.0",
5353
"property-information": "^6.0.0",
5454
"space-separated-tokens": "^2.0.0",
55-
"style-to-object": "^0.4.0",
55+
"style-to-object": "^0.4.1",
5656
"unist-util-position": "^4.0.0",
5757
"zwitch": "^2.0.0"
5858
},

0 commit comments

Comments
 (0)