Add [] to soydata_converters.js
I'm not sure how this was working before, but i came across a strict deps error for this while investigating something else.
example: []
@@ -1386,6 +1386,48 @@ if (goog.DEPENDENCIES_ENABLED) {
}
+/**
+ * @package {?boolean}
+ * Visible for testing.
+ */
+goog.hasBadLetScoping = null;
+
+
+/**
+ * @return {boolean}
+ * @package Visible for testing.
+ */
+goog.useSafari10Workaround = function() {
+ if (goog.hasBadLetScoping == null) {
+ var hasBadLetScoping;
+ try {
+ hasBadLetScoping = !eval(
+ '"use strict";' +
+ 'let x = 1; function f() { return typeof x; };' +
+ 'f() == "number";');
+ } catch (e) {
+ // Assume that ES6 syntax isn't supported.
+ hasBadLetScoping = false;
+ }
+ goog.hasBadLetScoping = hasBadLetScoping;
+ }
+ return goog.hasBadLetScoping;
+};
+
+
+/**
+ * @param {string} moduleDef
+ * @return {string}
+ * @package Visible for testing.
+ */
+goog.workaroundSafari10EvalBug = function(moduleDef) {
+ return '(function(){' + moduleDef +
+ '\n' + // Terminate any trailing single line comment.
+ ';' + // Terminate any trailing expression.
+ '})();\n';
+};
+
+
/**
* @param {function(?):?|string} moduleDef The module definition.
*/
@@ -1405,6 +1447,10 @@ goog.loadModule = function(moduleDef) {
if (goog.isFunction(moduleDef)) {
exports = moduleDef.call(undefined, {});
} else if (goog.isString(moduleDef)) {
+ if (goog.useSafari10Workaround()) {
+ moduleDef = goog.workaroundSafari10EvalBug(moduleDef);
+ }
+
exports = goog.loadModuleFromSource_.call(undefined, moduleDef);
} else {
throw Error('Invalid module definition');
