Merge pull request #655 from google/RoboErikG-chkBox-uc

Make field checkbox setValue case insensitive
This commit is contained in:
Rachel Fenichel
2016-09-28 16:26:53 -07:00
committed by GitHub

View File

@@ -88,7 +88,7 @@ Blockly.FieldCheckbox.prototype.getValue = function() {
* @param {string} strBool New state.
*/
Blockly.FieldCheckbox.prototype.setValue = function(strBool) {
var newState = (strBool == 'TRUE');
var newState = (strBool.toUpperCase() == 'TRUE');
if (this.state_ !== newState) {
if (this.sourceBlock_ && Blockly.Events.isEnabled()) {
Blockly.Events.fire(new Blockly.Events.Change(