Commit b81bff88 authored by Neil Fraser's avatar Neil Fraser

Merge pull request #27 from BrianGeppert/bugfix/prompt-cancel

Don't crash on prompt cancel.
parents 1d3cf36b 713397b0
......@@ -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