-
Notifications
You must be signed in to change notification settings - Fork 20
TypeError: title.match is not a function #37
Comments
Hey mate, Looks like the title argument passed to getIcon(title) is not always a string, if its not a string calling the match function on the argument is going to fail. My solution was to call toString on the argument and then chaining match on the end, like so -> // Current process icon
const getIcon = (title) => {
const process = title.toString().match(/(?:[\s]+|^)(gulp|php|node|npm|yarn|vim|nvim|python|mysql)(?:[\s]+|$)/i);
return process ? process[0].trim().toLowerCase() : 'shell';
}; That solved the problem. There is probably a better way to do this... I will let the maintainers make that call though. |
… call match on a non string.
Unfortunately I'm still seeing this error! Hyper 2.1.2 stable, here is the hypertabs config section: hyperTabs: {
border: true,
tabIconsColored: true,
activityColor: 'red',
closeAlign: 'right'
}, |
See the same errror on Hyper 2.1.2 as @creativedrewy
|
Removing "hyper-tab-icons" plugin had worked for me |
Hi there, I'm on WSL running canary build, below is the error I get:
The text was updated successfully, but these errors were encountered: