UNPKG

wix-style-react

Version:
27 lines (22 loc) 614 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.register = void 0; var register = function register() { if (window && !window.matchMedia) { window.matchMedia = function () { return { matches: false, addListener: function addListener() {}, removeListener: function removeListener() {} }; }; } global.matchMedia = global.matchMedia || window.matchMedia; }; exports.register = register; var isTestEnv = process.env.NODE_ENV === 'test'; if (isTestEnv && typeof window !== 'undefined' && !window.matchMedia) { register(); }