ericcornelissen / pinned-tabs-for-atom

A package for the Atom text editor that allows you to pin tabs
https://atom.io/packages/pinned-tabs
MIT License
18 stars 3 forks source link

Uncaught TypeError: item.onDidChangeTitle is not a function #30

Closed stonegray closed 7 years ago

stonegray commented 7 years ago

Pinning a browser-plus tab causes an uncaught error.

Atom: 1.16.0 x64 Electron: 1.3.13 OS: Mac OS X 10.12.4 Thrown From: pinned-tabs package 1.0.2

Stack Trace

Uncaught TypeError: item.onDidChangeTitle is not a function

At /Users/stonegray/.atom/packages/pinned-tabs/lib/pinned-tabs.coffee:157

TypeError: item.onDidChangeTitle is not a function
    at Object.pin (/packages/pinned-tabs/lib/pinned-tabs.coffee:157:12)
    at Object.pinSelected (/packages/pinned-tabs/lib/pinned-tabs.coffee:137:6)
    at /packages/pinned-tabs/lib/pinned-tabs.coffee:68:73)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/app.asar/src/command-registry.js:259:29)
    at CommandRegistry.handleCommandEvent (/app.asar/src/command-registry.js:3:59)
    at CommandRegistry.module.exports.CommandRegistry.dispatch (/app.asar/src/command-registry.js:160:19)
    at AtomEnvironment.module.exports.AtomEnvironment.dispatchContextMenuCommand (/app.asar/src/atom-environment.js:1185:28)
    at EventEmitter.outerCallback (/app.asar/src/application-delegate.js:325:25)
    at emitThree (events.js:116:13)
    at EventEmitter.emit (events.js:194:7)

Commands

     -5:43.4.0 application:add-project-folder (span.name.icon.icon-repo)
  3x -4:30.3.0 platformio-ide-terminal:toggle (div.package-detail.panels-item)
  2x -4:19.8.0 core:backspace (input.hidden-input)
     -4:18.1.0 core:confirm (input.hidden-input)
     -3:24.3.0 application:open (input.hidden-input)
     -3:21.1.0 browser-plus:open (input.hidden-input)
     -2:32.5.0 window:decrease-font-size (webview.native-key-bindings)
  2x -2:31.6.0 window:increase-font-size (webview.native-key-bindings)
     -2:30.7.0 window:decrease-font-size (webview.native-key-bindings)
  9x -1:28.7.0 platformio-ide-terminal:toggle (webview.native-key-bindings)
     -0:54.1.0 editor:consolidate-selections (input.hidden-input)
     -0:54.1.0 core:cancel (input.hidden-input)
     -0:53.5.0 platformio-ide-terminal:toggle (input.hidden-input)
     -0:26.9.0 core:select-all (input.hidden-input)
     -0:24.6.0 core:confirm (input.hidden-input)
     -0:10.7.0 pinned-tabs:pin-selected (li.tab.sortable.right-clicked)

Non-Core Packages

atom-beautify 0.29.23 
atom-clock 0.1.7 
autocomplete-paths 1.0.5 
browser-plus 0.0.87 
browser-plus-open-new-window 0.0.1 
browser-plus-zoom 0.0.2 
build-tools 4.5.9 
build-tools-make 0.2.1 
fonts 2.0.0 
git-plus 7.8.0 
language-gcode 0.1.1 
language-linuxcnc-gcode 0.1.1 
pinned-tabs 1.0.2 
platformio-ide-terminal 2.5.0 
project-manager 3.3.4 
terminal-plus 0.14.5 
ericcornelissen commented 7 years ago

Thanks for reporting! I was able to fix this issue 🎉 but unfortunately the browser-plus package tab has some other issues with this package as tab is not able to stay pinned after a restart (browser-plus is lacking away to identify its tab)...

ericcornelissen commented 7 years ago

Published a patch with v1.0.3 🙂