From f1c73e2244fe3bece46ac554e43b8036646c431d Mon Sep 17 00:00:00 2001 From: Neil Fraser Date: Tue, 11 Jun 2019 23:28:07 -0700 Subject: [PATCH] Rename helper function --- core/field.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/field.js b/core/field.js index 86fd29818..7c50b46a6 100644 --- a/core/field.js +++ b/core/field.js @@ -736,7 +736,7 @@ Blockly.Field.prototype.setValue = function(newValue) { var validatedValue = this.doClassValidation_(newValue); // Class validators might accidentally forget to return, we'll ignore that. - newValue = this.validate_(newValue, validatedValue); + newValue = this.processValidation_(newValue, validatedValue); if (newValue instanceof Error) { doLogging && console.log('invalid class validation, return'); return; @@ -746,7 +746,7 @@ Blockly.Field.prototype.setValue = function(newValue) { if (localValidator) { validatedValue = localValidator.call(this, newValue); // Local validators might accidentally forget to return, we'll ignore that. - newValue = this.validate_(newValue, validatedValue); + newValue = this.processValidation_(newValue, validatedValue); if (newValue instanceof Error) { doLogging && console.log('invalid local validation, return'); return; @@ -777,7 +777,8 @@ Blockly.Field.prototype.setValue = function(newValue) { * @return {*} New value, or an Error object. * @private */ -Blockly.Field.prototype.validate_ = function(newValue, validatedValue) { +Blockly.Field.prototype.processValidation_ = function(newValue, + validatedValue) { if (validatedValue !== undefined) { newValue = validatedValue; }