babel-parser: Deep freeze for makeErrorTemplates (#13142)
This commit is contained in:
parent
7484b51e56
commit
c949660b34
@ -36,11 +36,11 @@ export function makeErrorTemplates(
|
||||
): ErrorTemplates {
|
||||
const templates: ErrorTemplates = {};
|
||||
Object.keys(messages).forEach(reasonCode => {
|
||||
templates[reasonCode] = {
|
||||
templates[reasonCode] = Object.freeze({
|
||||
code,
|
||||
reasonCode,
|
||||
template: messages[reasonCode],
|
||||
};
|
||||
});
|
||||
});
|
||||
return Object.freeze(templates);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user