steelbrain / linter-ui-default

Default UI for the Atom Linter package
MIT License
84 stars 47 forks source link

Uncaught TypeError: Cannot read property 'file' of undefined #573

Closed laulucky closed 4 years ago

laulucky commented 4 years ago

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.45.0 x64 Electron: 4.2.7 OS: Mac OS X 10.13.6 Thrown From: linter-ui-default package 1.8.1

Stack Trace

Uncaught TypeError: Cannot read property 'file' of undefined

At /Users/lau/.atom/packages/linter-ui-default/lib/helpers.js:29

TypeError: Cannot read property 'file' of undefined
    at /packages/linter-ui-default/lib/helpers.js:29:27)
    at /packages/linter-ui-default/lib/editors.js:45:24
    at Array.forEach (<anonymous>)
    at Editors.update (/packages/linter-ui-default/lib/editors.js:44:11)
    at LinterUI.render (/packages/linter-ui-default/lib/main.js:87:17)
    at /packages/linter/lib/ui-registry.js:29:16
    at Set.forEach (<anonymous>)
    at UIRegistry.render (/packages/linter/lib/ui-registry.js:28:20)
    at /packages/linter/lib/main.js:131:23
    at Function.simpleDispatch (/private/var/folders/2k/h5h4r49s6zn5hfr04sj8kxfc0000gn/T/AppTranslocation/D63F8A22-710A-4355-85F7-EEA893450CD7/d/Atom.app/Contents/Resources/app/static/<embedded>:11:1214120)
    at Emitter.emit (/private/var/folders/2k/h5h4r49s6zn5hfr04sj8kxfc0000gn/T/AppTranslocation/D63F8A22-710A-4355-85F7-EEA893450CD7/d/Atom.app/Contents/Resources/app/static/<embedded>:11:1215561)
    at MessageRegistry.update (/packages/linter/lib/message-registry.js:130:20)
    at later (/packages/linter/node_modules/sb-debounce/index.js:9:14)

Commands

  4x -0:18.6.0 core:save (input.hidden-input)

Non-Core Packages

autocomplete-solidity 0.3.4 
busy-signal 2.0.1 
intentions 1.1.5 
language-ethereum 0.3.9 
language-solidity 0.1.1 
linter 2.0.0 
linter-solidity 0.5.0 
linter-ui-default 1.8.1 
aminya commented 4 years ago

I am hitting this in https://github.com/steelbrain/linter/pull/1706. My guess is that it is because Linter-UI tries to get files for an empty array. I need to debug it more closely.

aminya commented 4 years ago

@laulucky does this happen in the latest version?