Skip to content

Shows 'NaN' everytime and throws TypeError: Cannot read property 'getSelectedText' of undefined #81

@vivi90

Description

@vivi90

Sometimes it happens, that the plugin is not usable, because it continues to display NaN.
In such a situation it also throws at least at the developer console the following message:

Uncaught TypeError: Cannot read property 'getSelectedText' of undefined
    at DecHexOctBinView.getSelectedText (dec-hex-oct-bin-view.js:73)
    at DecHexOctBinView.parseAsHex (dec-hex-oct-bin-view.js:85)
getSelectedText    @    dec-hex-oct-bin-view.js:73
parseAsHex    @    dec-hex-oct-bin-view.js:85

Confirmed affected operating systems are both Windows 10 and Manjaro Linux.
Some users are lucky and after closing and reopening the plugin panel, it works again.
But some users not.
Here are the environment versions of one of the unlucky users on Windows 10:

Atom    : 1.55.0       
Electron: 6.1.12       
Chrome  : 76.0.3809.146
Node    : 12.4.0  

The origin of this issue seems to be:

return atom.workspace.getActiveTextEditor().getSelectedText();

So this might be an issue with Atom itself?
Unfortunately this issue seems to be hardly reproducible.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions