semantic-ui-react
Version:
The official Semantic-UI-React integration.
9 lines (7 loc) • 398 B
JavaScript
import _isNil from "lodash-es/isNil";
var hasDocument = typeof document === 'object' && document !== null;
var hasWindow = typeof window === 'object' && window !== null && window.self === window; // eslint-disable-next-line no-confusing-arrow
var isBrowser = function isBrowser() {
return !_isNil(isBrowser.override) ? isBrowser.override : hasDocument && hasWindow;
};
export default isBrowser;