UNPKG

material-ui

Version:

React Components that Implement Google's Material Design.

26 lines (20 loc) 708 B
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = callOnce; var _warning = require('warning'); var _warning2 = _interopRequireDefault(_warning); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var CALLED_ONCE = 'muiPrepared'; function callOnce() { if (process.env.NODE_ENV !== 'production') { return function (style) { if (style[CALLED_ONCE]) { process.env.NODE_ENV !== "production" ? (0, _warning2.default)(false, 'Material-UI: You cannot call prepareStyles() on the same style object more than once.') : void 0; } style[CALLED_ONCE] = true; return style; }; } }