ericcornelissen/pinned-tabs-for-atom

Uncaught TypeError: _this.state.data[pane.id].filter is not a function

Closed this issue ยท 8 comments

Atom: 1.16.0 ia32
Electron: 1.3.13
OS: Microsoft Windows 7 Enterprise
Thrown From: pinned-tabs package 1.0.1

Stack Trace

Uncaught TypeError: _this.state.data[pane.id].filter is not a function

At C:\Users\...\.atom\packages\pinned-tabs\lib\pinned-tabs.coffee:92

TypeError: _this.state.data[pane.id].filter is not a function
    at /packages/pinned-tabs/lib/pinned-tabs.coffee:92:51
    at Function.module.exports.Emitter.simpleDispatch (/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (/app.asar/node_modules/event-kit/lib/emitter.js:141:28)
    at PaneContainer.module.exports.PaneContainer.willDestroyPaneItem (/app.asar/src/pane-container.js:300:27)
    at Pane.module.exports.Pane.destroyItem (/app.asar/src/pane.js:651:16)
    at TabBarView.module.exports.TabBarView.closeTab (/app.asar/node_modules/tabs/lib/tab-bar-view.js:333:26)
    at HTMLDivElement.TabView.didClickCloseIcon (/app.asar/node_modules/tabs/lib/tab-bar-view.js:222:19)

This happens when I try to close any tab.

I confirm this happens to me too.

๐Ÿค” this seems like a weird bug to me... I've got two request for anyone having this issue:

  • Can anyone provide more specific steps to reproduce? Like, did you pin any tabs before closing the tab?
  • Can someone verify if the problem is solved with the latest commit (0718d35) to master? (clone the repo into your .../.atom/package and install its dependencies using npm install)

Here's how the bug first appeared for me:

  1. Have 10 tabs pinned.
  2. Update pinned-tabs and restart atom.
  3. All the tabs are now unpinned.
  4. Try to close a tab, get the error.

Ah thx for the info! That explains a lot... In that case the issue is caused by the fact that I slightly changed how the package remembers its last state and it conflicts with the old way... I'll try to get a fix out asap ๐Ÿ˜…

I can't reproduce the bug, even if I switch between older versions and v1.0.1... But I think I managed to find a solution that fixes the solution (also in the long run) ๐Ÿ™‚

@jeffs244, could you try the latest push to master (commit ca9a47a) and report if this fixes the problem?

@ericcornelissen your fix seems to have worked fine. No problem on my end with the latest master.

Great ๐ŸŽ‰ Then I'll probably publish the fix later today