Don't override the goog namespace if it already exists

This commit is contained in:
Chad Killingsworth
2017-03-07 13:07:47 -06:00
parent 8fd1b212d3
commit b30deb22ae

View File

@@ -39,13 +39,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
When using Closure Compiler, goog.reflect.objectProperty(property, object) is replaced by the munged name for object[property]
We cannot alias this function, so we have to use a small shim that has the same behavior when not compiling.
*/
window.goog = {
reflect: {
objectProperty(s, o) {
return s;
}
window.goog = window.goog || {};
window.goog.reflect = window.goog.reflect || {
objectProperty(s, o) {
return s;
}
}
};
/* eslint-enable */
})();