gschrader / tabs-closer

Adds more context menus for closing tabs in Atom
https://atom.io/packages/tabs-closer
MIT License
6 stars 2 forks source link

Uncaught TypeError: Cannot read property 'indexOf' of undefined #6

Closed ThariqS closed 7 years ago

ThariqS commented 7 years ago

Tab closer looks great but just doesn't work for me, it throws the following error on every use:


Atom: 1.17.0 x64 Electron: 1.3.15 OS: Mac OS X 10.11.2 Thrown From: tabs-closer package 0.15.0

Stack Trace

Uncaught TypeError: Cannot read property 'indexOf' of undefined

At /Users/thariqshihipar/.atom/packages/tabs-closer/lib/tabs-closer.coffee:14

TypeError: Cannot read property 'indexOf' of undefined
    at Object.tabInRepo (/packages/tabs-closer/lib/tabs-closer.coffee:14:30)
    at /packages/tabs-closer/lib/tabs-closer.coffee:19:84)
    at Object.closeUnmodifiedTabs (/packages/tabs-closer/lib/tabs-closer.coffee:19:7)
    at /packages/tabs-closer/lib/tabs-closer.coffee:4:82)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:265:1)
    at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:1)
    at CommandRegistry.module.exports.CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:166:1)
    at AtomEnvironment.module.exports.AtomEnvironment.dispatchContextMenuCommand (/Applications/Atom.app/Contents/Resources/app/src/atom-environment.js:1292:1)
    at EventEmitter.outerCallback (/Applications/Atom.app/Contents/Resources/app/src/application-delegate.js:347:1)
    at emitThree (events.js:116:13)
    at EventEmitter.emit (events.js:194:7)

Commands

     -0:26.3.0 tree-view:toggle (input.hidden-input)
     -0:24 tabs-closer:close-unmodified-tabs (div.title)

Non-Core Packages

atom-import-sort 2.4.0 
atom-pair 2.0.10 
color-picker 2.2.5 
es6-javascript 1.0.0 
js-refactor 0.7.5 
language-babel 2.59.1 
linter 1.11.18 
linter-eslint 8.0.0 
prettier-atom 0.29.0 
react 0.16.1 
refactor 0.11.3 
tabs-closer 0.15.0 
gschrader commented 7 years ago

I just happened to reproduce this by fluke, do you happen to have an "untitled" new file in a tab?

ThariqS commented 7 years ago

yes I think so!

gschrader commented 7 years ago

ok I'll attempt to fix that, the workaround for now is to close that tab.

Thanks for the report, cheers!

gschrader commented 7 years ago

This should now work in version 0.16.0