henrikruscon / hyper-tabs-enhanced

Enhanced Tabs Plugin for Hyper
MIT License
192 stars 20 forks source link

TypeError: Cannot read property 'lightYellow' of undefined #19

Closed ELLIOTTCABLE closed 7 years ago

ELLIOTTCABLE commented 7 years ago

When installing this plugin, I get the error TypeError: Cannot read property 'lightYellow' of undefined:

screen shot 2017-05-23 at 1 19 24 am

Worse, thereafter, I cannot successfully open Hyper; when trying to, no window appears, and Hyper's menubar never loads:

screen shot 2017-05-23 at 1 21 15 am

If I launch it from the Terminal, I get this on stdout:

> /Applications/Hyper.app/Contents/MacOS/Hyper
running in prod mode
electron will open file:///Applications/Hyper.app/Contents/Resources/app/index.html
Error while loading devtools extensions TypeError: Cannot read property 'lightYellow' of undefined
    at Object.exports.decorateConfig (/Users/ec/.hyper_plugins/node_modules/hyper-tabs-enhanced/index.js:19:37)
    at modules.forEach.plugin (/Applications/Hyper.app/Contents/Resources/app/plugins.js:345:30)
    at Array.forEach (native)
    at decorateObject (/Applications/Hyper.app/Contents/Resources/app/plugins.js:343:11)
    at Object.exports.getDecoratedConfig (/Applications/Hyper.app/Contents/Resources/app/plugins.js:367:10)
    at createWindow (/Applications/Hyper.app/Contents/Resources/app/index.js:107:23)
    at installDevExtensions.then (/Applications/Hyper.app/Contents/Resources/app/index.js:379:3)
ELLIOTTCABLE commented 7 years ago

Okay, turns out this happens if the existing config doesn't have a colours array (I use a theme, and have deleted all the unchanged-from-default values from my configuration.)

So, it looks like index.js needs to access the default value in Hyper, in the case of the config object missing the defaults!

henrikruscon commented 7 years ago

Just fixed this in latest commit ✌️

ELLIOTTCABLE commented 7 years ago

<3