Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Cannot read property 'newPosition' of undefined #2088

Open
@surdu

Description

@surdu

Description

I have a PR with 4 reviews. When clicking the comment icon in the editor's gutter, or when trying to open the reviews from the GitHub pane, I get an error and GitHub pane turns blank.

Steps to Reproduce

  1. Have a PR with reviews
  2. Open a file that contains a review, or open the GitHub pane
  3. Click on a comment icon in the gutter where a review is placed, or try to open the reviews page by clicking the Reviews button in the GitHub pane

Expected behavior:

The review pane opens

Actual behavior:

I get the following error in the console (twice) and the GitHub pane turns blank:

TypeError: Cannot read property 'newPosition' of undefined
    at ReviewsView.getTranslatedPosition (/Applications/Atom Beta.app/Contents/Resources/app/static/<embedded>:14:4204288)
    at ReviewsView.e (/Applications/Atom Beta.app/Contents/Resources/app/static/<embedded>:14:4193399)
    at Array.map (<anonymous>)
    at ReviewsView.renderReviewCommentThreads (/Applications/Atom Beta.app/Contents/Resources/app/static/<embedded>:14:4203667)
    at ReviewsView.render (/Applications/Atom Beta.app/Contents/Resources/app/static/<embedded>:14:4199921)
    at Qg (/Applications/Atom Beta.app/Contents/Resources/app/static/<embedded>:14:2458425)
    at Og (/Applications/Atom Beta.app/Contents/Resources/app/static/<embedded>:14:2458220)
    at Tg (/Applications/Atom Beta.app/Contents/Resources/app/static/<embedded>:14:2462053)
    at bi (/Applications/Atom Beta.app/Contents/Resources/app/static/<embedded>:14:2486059)
    at ci (/Applications/Atom Beta.app/Contents/Resources/app/static/<embedded>:14:2486443)
    at Di (/Applications/Atom Beta.app/Contents/Resources/app/static/<embedded>:14:2493333)
    at Yh (/Applications/Atom Beta.app/Contents/Resources/app/static/<embedded>:14:2492713)
    at Xh (/Applications/Atom Beta.app/Contents/Resources/app/static/<embedded>:14:2491734)
    at qf (/Applications/Atom Beta.app/Contents/Resources/app/static/<embedded>:14:2490605)
    at Object.enqueueSetState (/Applications/Atom Beta.app/Contents/Resources/app/static/<embedded>:14:2440249)
    at ObserveModel.E.setState (/Applications/Atom Beta.app/Contents/Resources/app/static/<embedded>:14:2368962)
    at ModelObserver.ObserveModel._defineProperty [as didUpdate] (/Applications/Atom Beta.app/Contents/Resources/app/static/<embedded>:14:3492176)
    at ModelObserver._refreshModelData (/Applications/Atom Beta.app/Contents/Resources/app/static/<embedded>:14:3948220)
    at <anonymous>

Reproduces how often:

It worked one time, but after I fixed one of the reviews I keep getting the error, even after a restart.

Versions

❯ atom-beta --version
Atom    : 1.37.0-beta0
Electron: 2.0.18
Chrome  : 61.0.3163.100
Node    : 8.9.3

❯ apm-beta --version
apm  2.1.7
npm  6.2.0
node 8.9.3 x64
atom 1.37.0-beta0
python 2.7.10
git 2.14.3
github: v0.28.0
OS: macOS 10.12.6 (16G1918)

Additional Information

Unfortunately, the repo is private

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions