Skip to content

Commit

Permalink
fix(mathers): fix hasCss if style applied but jQuery returns null (#270)
Browse files Browse the repository at this point in the history
  • Loading branch information
Coffee-Tea committed Mar 5, 2020
1 parent fb03faa commit eda8ac3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion projects/spectator/src/lib/matchers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const hasCss = (el: HTMLElement, css: { [key: string]: string }) => {
continue;
}

if (trim($el.css(prop)) !== trim(value) && trim(el.style[prop]) !== trim(value)) {
if (trim($el.css(prop) || '') !== trim(value) && trim(el.style[prop] || '') !== trim(value)) {
return false;
}
}
Expand Down

0 comments on commit eda8ac3

Please sign in to comment.