From db26c4c541315f2eef615e00fc956e7d30014051 Mon Sep 17 00:00:00 2001 From: Rachel Fenichel Date: Tue, 25 Apr 2017 14:12:21 -0700 Subject: [PATCH] use goog.string.startswith instead of string.startswith (#1065) --- demos/code/code.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/demos/code/code.js b/demos/code/code.js index 174cd2263..df3d640db 100644 --- a/demos/code/code.js +++ b/demos/code/code.js @@ -387,12 +387,12 @@ Code.init = function() { // format (eg. ``). // 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]; } }