1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Additional length check just in case.

This commit is contained in:
Kevin Serrano 2016-06-28 11:34:30 -07:00
parent 86a1eaadf1
commit a69882df72

View File

@ -45,6 +45,7 @@ EditableLabel.prototype.saveIfEnter = function (event) {
EditableLabel.prototype.saveText = function () {
var container = findDOMNode(this)
var text = container.querySelector('.editable-label input').value
this.props.saveText(text)
this.setState({ isEditingLabel: false, textLabel: text })
var truncatedText = text.substring(0,30)
this.props.saveText(truncatedText)
this.setState({ isEditingLabel: false, textLabel: truncatedText })
}