Skip to content

Commit 94ebb8d

Browse files
committed
perf: type for replace
1 parent 6090060 commit 94ebb8d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const parser = (html: string, options: Options = {}): Node[] => {
4444
Object.keys(attrs).forEach((key: string) => {
4545
const object: Attributes = {};
4646

47-
object[key] = attrs[key].replace(/"/g, '"');
47+
object[key] = String(attrs[key]).replace(/"/g, '"');
4848
Object.assign(result, object);
4949
});
5050

0 commit comments

Comments
 (0)