Trim profile name when upgrading from SwitchySharp. Fix #778

This commit is contained in:
FelisCatus 2016-05-26 13:51:51 +08:00
parent f2ddaa0f4f
commit f658ef9e6c

View File

@ -107,6 +107,7 @@ module.exports = (oldOptions, i18n) ->
color = oldProfile['color']
profile.color = colorTranslations[color] ? colorTranslations['']
name = oldProfile['name'] ? oldProfile['id']
name = name.trim()
if name[0] == '_'
name = 'p' + name
profile.name = name