mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-29 03:45:15 +00:00
29 lines
972 B
JavaScript
29 lines
972 B
JavaScript
|
"use strict";
|
||
|
|
||
|
Object.defineProperty(exports, "__esModule", {
|
||
|
value: true
|
||
|
});
|
||
|
exports.default = formatMuiErrorMessage;
|
||
|
|
||
|
/**
|
||
|
* WARNING: Don't import this directly.
|
||
|
* Use `MuiError` from `@material-ui/utils/macros/MuiError.macro` instead.
|
||
|
* @param {number} code
|
||
|
*/
|
||
|
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 */
|
||
|
}
|