Commit 713397b0 authored by Brian Geppert's avatar Brian Geppert

Don't crash on prompt cancel.

parent 1d3cf36b
......@@ -253,6 +253,9 @@ Blockly.FieldTextInput.prototype.widgetDispose_ = function() {
* @return {?string} A string representing a valid number, or null if invalid.
*/
Blockly.FieldTextInput.numberValidator = function(text) {
if(text === null) {
return null;
}
// TODO: Handle cases like 'ten', '1.203,14', etc.
// 'O' is sometimes mistaken for '0' by inexperienced users.
text = text.replace(/O/ig, '0');
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment