react-instantsearch-core
7.25.07.26.0
dist/cjs/connectors/usePoweredBy.js~
dist/cjs/connectors/usePoweredBy.jsModified+18−19
Index: package/dist/cjs/connectors/usePoweredBy.js
===================================================================
--- package/dist/cjs/connectors/usePoweredBy.js
+++ package/dist/cjs/connectors/usePoweredBy.js
@@ -1,21 +1,20 @@
-"use strict";
+'use strict';
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.usePoweredBy = usePoweredBy;
-var _utils = require("instantsearch.js/cjs/lib/utils");
+var utils = require('instantsearch.js/cjs/lib/utils');
+
function usePoweredBy() {
- var hostname = (0, _utils.safelyRunOnBrowser)(function (_ref) {
- var _window$location;
- var window = _ref.window;
- return ((_window$location = window.location) === null || _window$location === void 0 ? void 0 : _window$location.hostname) || '';
- }, {
- fallback: function fallback() {
- return '';
- }
- });
- return {
- url: "https://www.algolia.com/?utm_source=react-instantsearch&utm_medium=website&utm_content=".concat(hostname, "&utm_campaign=poweredby")
- };
-}
\ No newline at end of file
+ var hostname = utils.safelyRunOnBrowser(function(param) {
+ var window = param.window;
+ var _window_location;
+ return ((_window_location = window.location) === null || _window_location === void 0 ? void 0 : _window_location.hostname) || '';
+ }, {
+ fallback: function fallback() {
+ return '';
+ }
+ });
+ return {
+ url: "https://www.algolia.com/?utm_source=react-instantsearch&utm_medium=website&utm_content=".concat(hostname, "&utm_campaign=poweredby")
+ };
+}
+
+exports.usePoweredBy = usePoweredBy;