@bigbinary/neeto-commons-frontend 2.0.97 → 2.0.98

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/initializers.js CHANGED
@@ -2223,7 +2223,7 @@ var commonsEn = {
2223
2223
  neetoCommons: neetoCommons
2224
2224
  };
2225
2225
 
2226
- var packageNames = ["neeto-molecules", "neeto-team-members-frontend", "neeto-tags-frontend"];
2226
+ var packageNames = ["neeto-molecules", "neeto-integrations-frontend", "neeto-team-members-frontend", "neeto-tags-frontend"];
2227
2227
  var getPackageTranslations = function getPackageTranslations(language, packageNames) {
2228
2228
  var loadTranslations = curry(function (language, packageName) {
2229
2229
  try {
@@ -2292,6 +2292,24 @@ function initializeMixPanel() {
2292
2292
  mixpanel.identify(globalProps.user.email);
2293
2293
  }
2294
2294
 
2295
+ var isObjectOrFunction = function isObjectOrFunction(object) {
2296
+ var type = _typeof(object);
2297
+ return type === "function" || type === "object" && !!object;
2298
+ };
2299
+ function disableReactDevTools() {
2300
+ if (window && window.document) {
2301
+ var developerToolsHook = window.__REACT_DEVTOOLS_GLOBAL_HOOK__;
2302
+ if (!isObjectOrFunction(developerToolsHook)) return;
2303
+ for (var prop in developerToolsHook) {
2304
+ if (prop === "renderers") {
2305
+ developerToolsHook[prop] = new Map();
2306
+ } else {
2307
+ developerToolsHook[prop] = typeof developerToolsHook[prop] === "function" ? Function.prototype : null;
2308
+ }
2309
+ }
2310
+ }
2311
+ }
2312
+
2295
2313
  // eslint-disable-next-line import/no-mutable-exports
2296
2314
  var globalProps$1 = {};
2297
2315
  function initializeApplication(_ref) {
@@ -2308,6 +2326,7 @@ function initializeApplication(_ref) {
2308
2326
  }
2309
2327
  if (!(skip !== null && skip !== void 0 && skip.i18n)) initializeI18n(translationResources);
2310
2328
  if (!(skip !== null && skip !== void 0 && skip.logger)) initializeLogger();
2329
+ if (process.env.NODE_ENV === "production") disableReactDevTools();
2311
2330
  }
2312
2331
 
2313
2332
  export { initializeApplication as default, globalProps$1 as globalProps };