mirror of
https://github.com/google/blockly.git
synced 2026-01-08 09:30:06 +01:00
Remove use of Array.prototype.includes which is not implemented in IE or Edge < 14. Fixes google/blockly#876.
This commit is contained in:
@@ -107,7 +107,7 @@ Blockly.Extensions.buildTooltipForDropdown = function(dropdownName, lookupTable)
|
||||
var extensionFn = function() {
|
||||
var thisBlock = this;
|
||||
|
||||
if (this.type && !blockTypesChecked.includes(this.type)) {
|
||||
if (this.type && blockTypesChecked.indexOf(this.type) === -1) {
|
||||
Blockly.Extensions.checkDropdownOptionsInTable_(
|
||||
this, dropdownName, lookupTable);
|
||||
blockTypesChecked.push(this.type);
|
||||
@@ -117,7 +117,7 @@ Blockly.Extensions.buildTooltipForDropdown = function(dropdownName, lookupTable)
|
||||
var value = thisBlock.getFieldValue(dropdownName);
|
||||
var tooltip = lookupTable[value];
|
||||
if (tooltip == null) {
|
||||
if (!blockTypesChecked.includes(thisBlock.type)) {
|
||||
if (blockTypesChecked.indexOf(thisBlock.type) === -1) {
|
||||
// Warn for missing values on generated tooltips
|
||||
var warning = 'No tooltip mapping for value ' + value +
|
||||
' of field ' + dropdownName;
|
||||
|
||||
Reference in New Issue
Block a user