Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion tests/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,14 @@ export function removeWhitespace(str) {
}

export function getRules(style) {
return [...style.sheet.cssRules]
const rulesArr = []
const {cssRules} = style.sheet
for (const key in cssRules) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe better for(;;)?

Copy link
Copy Markdown
Member Author

@kof kof Mar 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hah, for in failed in safari ... good catch

if ([].hasOwnProperty.call(cssRules, key)) {
rulesArr.push(cssRules[key])
}
}
return rulesArr
}

export function getStyle() {
Expand Down