ohctechv3/.svn/pristine/e8/e8ae0f1590206a2257d7128ac11c478e0819230e.svn-base
2024-10-28 15:03:36 +05:30

25 lines
952 B
Plaintext

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = formatMuiErrorMessage;
/**
* WARNING: Don't import this directly.
* Use `MuiError` from `@mui/internal-babel-macros/MuiError.macro` instead.
* @param {number} code
*/
function formatMuiErrorMessage(code) {
// Apply babel-plugin-transform-template-literals in loose mode
// loose mode is safe if we're concatenating primitives
// see https://babeljs.io/docs/en/babel-plugin-transform-template-literals#loose
/* eslint-disable prefer-template */
let url = 'https://mui.com/production-error/?code=' + code;
for (let i = 1; i < arguments.length; i += 1) {
// rest params over-transpile for this case
// eslint-disable-next-line prefer-rest-params
url += '&args[]=' + encodeURIComponent(arguments[i]);
}
return 'Minified MUI error #' + code + '; visit ' + url + ' for the full message.';
/* eslint-enable prefer-template */
}