GoScrobble/web/node_modules/@material-ui/utils/esm/formatMuiErrorMessage.js

22 lines
865 B
JavaScript
Raw Permalink Normal View History

2022-04-25 02:47:15 +00:00
/**
* WARNING: Don't import this directly.
* Use `MuiError` from `@material-ui/utils/macros/MuiError.macro` instead.
* @param {number} code
*/
export default function formatMuiErrorMessage(code) {
// Apply babel-plugin-transform-template-literals in loose mode
// loose mode is safe iff we're concatenating primitives
// see https://babeljs.io/docs/en/babel-plugin-transform-template-literals#loose
/* eslint-disable prefer-template */
var url = 'https://material-ui.com/production-error/?code=' + code;
for (var 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 Material-UI error #' + code + '; visit ' + url + ' for the full message.';
/* eslint-enable prefer-template */
}