Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Zach Bloomquist <git@chary.us>
  • Loading branch information
Blue F and flotwig committed Feb 8, 2022
1 parent 3424f90 commit ac6af16
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/driver/src/cy/chai/inspect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ export function create (chai) {

// We can't just check if object instanceof ShadowRoot, because it might be the document of an iframe,
// which in Chrome 99+ is a separate class, and instanceof ShadowRoot returns false.
let isShadowRoot = function (object) {
const isShadowRoot = function (object) {
return isDOMElement(object.host) && object.host.shadowRoot === object
}

// We can't just check if object instanceof Document, because it might be the document of an iframe,
// which in Chrome 99+ is a separate class, and instanceof Document returns false.
let isDocument = function (object) {
const isDocument = function (object) {
return object.defaultView && object.defaultView === object.defaultView.window
}

Expand Down

0 comments on commit ac6af16

Please sign in to comment.