Skip to content
This repository has been archived by the owner on Apr 11, 2019. It is now read-only.

TypeError: p.to is undefined #197

Open
jankeromnes opened this issue Jul 18, 2018 · 1 comment
Open

TypeError: p.to is undefined #197

jankeromnes opened this issue Jul 18, 2018 · 1 comment

Comments

@jankeromnes
Copy link
Contributor

jankeromnes commented Jul 18, 2018

The coverage front-end is broken on this revision: https://firefox-code-coverage.herokuapp.com/#/changeset/04dd259d71db60341016eccf53ced43742319631

The error is TypeError: p.to is undefined. Webpack and Devtools are not getting along well, but a simple git grep in the sources seems to point to:

const extensionTo = p.to.split('.').pop();

Adding logging on all these p variables (whatever they are) shows this problem:

// "usual" p:
{
  "chunks": [
    // ... lots of data ...
  ],
  "deletions": 22,
  "additions": 7,
  "from": "media/libcubeb/0002-Always-upmix-mono-to-the-first-two-channels-if-enoug.patch",
  "to": "media/libcubeb/0002-Always-upmix-mono-to-the-first-two-channels-if-enoug.patch"
}

// "defective" p that breaks the front-end:
{
  "chunks": [],
  "deletions": 2,
  "additions": 2,
  "from": ""
}

@armenzg should we simply skip ps that don't have a .to attribute?

@armenzg
Copy link
Contributor

armenzg commented Jul 18, 2018

Sure.

This could be a bug in parse-diff for the mentioned revision.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants