UNPKG

@commercetools-uikit/hooks

Version:

A collection of React hooks used across some of the UI-Kit components.

24 lines (22 loc) 812 B
import _classCallCheck from '@babel/runtime-corejs3/helpers/esm/classCallCheck'; import _createClass from '@babel/runtime-corejs3/helpers/esm/createClass'; import _globalThis from '@babel/runtime-corejs3/core-js/global-this'; // Polyfill for `MutationObserver` when used with SSR. // eslint-disable-next-line no-undef _globalThis.MutationObserver = typeof window !== 'undefined' && 'MutationObserver' in window ? window.MutationObserver : /*#__PURE__*/function () { function MutationObserver() { _classCallCheck(this, MutationObserver); } return _createClass(MutationObserver, [{ key: "observe", value: function observe() {} }, { key: "disconnect", value: function disconnect() {} }, { key: "takeRecords", value: function takeRecords() { return []; } }]); }();