Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on empty document #4177

bahmutov opened this issue May 10, 2019 · 2 comments

Crash on empty document #4177

bahmutov opened this issue May 10, 2019 · 2 comments


Copy link

@bahmutov bahmutov commented May 10, 2019

Cypress v3.2.0


it.only('works', () => {
  const doc = cy.state('document')

Hover over the assertion and see a crash in the console

Screen Shot 2019-05-10 at 11 43 06 AM

The code not being defensive enough because contents.find('html')[0] is undefined in this example

var htmlAttrs = _lodash.default.transform(contents.find('html')[0].attributes, function (memo, attr) {
        if (attr.specified) {
          memo[] = attr.value;
      }, {});
Copy link

@cypress-bot cypress-bot bot commented May 22, 2019

The code for this is done in cypress-io/cypress#4280, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

Copy link

@cypress-bot cypress-bot bot commented May 23, 2019

Released in 3.3.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants