react-instantsearch-core

7.25.07.26.0
dist/cjs/lib/warn.js
~dist/cjs/lib/warn.jsModified
+11−35
Index: package/dist/cjs/lib/warn.js
===================================================================
--- package/dist/cjs/lib/warn.js
+++ package/dist/cjs/lib/warn.js
@@ -1,40 +1,16 @@
-"use strict";
+'use strict';
 
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.warn = warn;
-exports.warnCache = void 0;
-/* eslint-disable no-console, no-empty */
-
-var warnCache = exports.warnCache = {
-  current: {}
+/* eslint-disable no-console, no-empty */ var warnCache = {
+    current: {}
 };
-
 /**
  * Logs a warning if the condition is not met.
  * This is used to log issues in development environment only.
- */
-function warn(condition, message) {
-  if (!(process.env.NODE_ENV === 'development')) {
-    return;
-  }
-  if (condition) {
-    return;
-  }
-  var sanitizedMessage = message.trim();
-  var hasAlreadyPrinted = warnCache.current[sanitizedMessage];
-  if (!hasAlreadyPrinted) {
-    warnCache.current[sanitizedMessage] = true;
-    var warning = "[InstantSearch] ".concat(sanitizedMessage);
-    console.warn(warning);
-    try {
-      // Welcome to debugging InstantSearch.
-      //
-      // This error was thrown as a convenience so that you can find the source
-      // of the warning that appears in the console by enabling "Pause on exceptions"
-      // in your debugger.
-      throw new Error(warning);
-    } catch (error) {}
-  }
-}
\ No newline at end of file
+ */ function warn(condition, message) {
+    {
+        return;
+    }
+}
+
+exports.warn = warn;
+exports.warnCache = warnCache;