felixerdy / touchbar

Atom package to use MacBook Touchbar
https://atom.io/packages/touchbar
MIT License
50 stars 10 forks source link

Uncaught TypeError: Cannot read property 'map' of undefined #18

Open yangwao opened 6 years ago

yangwao commented 6 years ago

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.21.1 x64 Electron: 1.6.15 OS: Mac OS X 10.13 Thrown From: touchbar package 0.6.1

Stack Trace

Uncaught TypeError: Cannot read property 'map' of undefined

At /Users/wao/.atom/packages/touchbar/lib/touchbar.js:100

TypeError: Cannot read property 'map' of undefined
    at Object.arrayToTouchBarElements (/packages/touchbar/lib/touchbar.js:100:13)
    at /packages/touchbar/lib/touchbar.js:152:25
    at Array.map (native)
    at Object.arrayToTouchBarElements (/packages/touchbar/lib/touchbar.js:100:14)
    at /packages/touchbar/lib/touchbar.js:61:29
    at /Applications/Atom.app/Contents/Resources/app/src/config.js:693:26
    at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:25:20)
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:141:34)
    at Config.module.exports.Config.emitChangeEvent (/Applications/Atom.app/Contents/Resources/app/src/config.js:884:35)
    at Config.module.exports.Config.setRawValue (/Applications/Atom.app/Contents/Resources/app/src/config.js:670:25)
    at Config.module.exports.Config.set (/Applications/Atom.app/Contents/Resources/app/src/config.js:248:20)
    at TouchBarEditView.typeChanged (/packages/touchbar/lib/touchbar-edit-view.js:64:19)
    at Object.onTypeChanged (/packages/touchbar/lib/touchbar-edit-view.js:96:52)
    at TouchBarItem.onTypeChanged (/packages/touchbar/lib/touchbar-item.js:55:16)
    at HTMLSelectElement.onchange (/packages/touchbar/lib/touchbar-item.js:69:76)

Commands

     -1:11.5.0 datatip:toggle (input.hidden-input)
  3x -1:10.8.0 standard-formatter:format (input.hidden-input)
     -1:08.1.0 command-palette:toggle (input.hidden-input)
     -1:04.0 editor:consolidate-selections (input.hidden-input)
     -1:04.0 core:cancel (input.hidden-input)
  7x -1:01.1.0 standard-formatter:format (input.hidden-input)
     -0:58.8.0 datatip:toggle (input.hidden-input)
     -0:58.5.0 core:move-down (input.hidden-input)
     -0:57.7.0 core:select-all (input.hidden-input)
     -0:56.8.0 standard-formatter:format (input.hidden-input)
     -0:56 datatip:toggle (input.hidden-input)
     -0:55.7.0 core:move-up (input.hidden-input)
     -0:54 core:move-right (input.hidden-input)
     -0:53.3.0 core:move-left (input.hidden-input)
     -0:52.9.0 core:save (input.hidden-input)
     -0:40.8.0 touchbar:edit (input.hidden-input)

Non-Core Packages

api-blueprint-preview 0.7.0 
atom-beautify 0.30.5 
atom-bootstrap4 1.4.0 
atom-ide-ui 0.5.2 
atom-jade 0.3.0 
atom-material-syntax-dark 1.0.0 
atom-material-ui 2.0.6 
atom-ternjs 0.18.3 
autoclose-html 0.23.0 
autocomplete-emojis 2.5.0 
autocomplete-js-import 1.4.0 
autocomplete-json 5.5.0 
autocomplete-modules 1.7.3 
autocomplete-solidity 0.3.3 
base16-syntax 1.8.1 
busy-signal 1.4.3 
color-picker 2.2.5 
file-icons 2.1.13 
gloom 0.6.4 
hyperclick 0.0.0 
ide-typescript 0.6.2 
intentions 1.1.5 
js-hyperclick 1.11.1 
language-ethereum 0.3.9 
language-pug 0.0.21 
language-vue 0.23.1 
linter 2.2.0 
linter-flow 5.6.1 
linter-js-standard 4.0.2 
linter-jsonlint 1.3.0 
linter-solidity 0.5.0 
linter-ui-default 1.6.10 
linter-write-good 0.9.0 
no-title-bar 1.11.3 
open-recent 5.0.0 
platformio-ide-terminal 2.7.0 
seti-syntax 1.1.3 
standard-formatter 2.8.0 
standardjs-snippets 2.6.2 
sync-settings 0.8.3 
touchbar 0.6.1 
tree-view-git-status 1.4.0 
vue-hyperclick 0.2.0 
vue-snippets 0.6.0 
vue2-autocomplete 0.1.0-alpha.4 
vuejs2-snippets 0.14.0 
wombat-dark-syntax 1.2.0 
felixerdy commented 6 years ago

I think you selected a group or a popover, right @yangwao ? Currently, there is no option to add child elements to groups or popovers. But that should come in the future!

yangwao commented 6 years ago

@felixerdy yes, something like that. I also found another issue I could replicate it only twice. Great work, thanks! :)