mirror of
https://github.com/google/blockly.git
synced 2026-01-06 16:40:07 +01:00
use goog.string.startswith instead of string.startswith (#1065)
This commit is contained in:
@@ -387,12 +387,12 @@ Code.init = function() {
|
||||
// format (eg. `<category name="%{BKY_CATLOGIC}">`).
|
||||
// These message keys need to be defined in `Blockly.Msg` in order to
|
||||
// be decoded by the library. Therefore, we'll use the `MSG` dictionary that's
|
||||
// been defined for each language to import each category name message
|
||||
// been defined for each language to import each category name message
|
||||
// into `Blockly.Msg`.
|
||||
// TODO: Clean up the message files so this is done explicitly instead of
|
||||
// through this for-loop.
|
||||
for (var messageKey in MSG) {
|
||||
if (messageKey.startsWith('cat')) {
|
||||
if (goog.string.startsWith(messageKey, 'cat')) {
|
||||
Blockly.Msg[messageKey.toUpperCase()] = MSG[messageKey];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user