change '_.clone(..args)' to 'Object.assign({}, ..args)'

This commit is contained in:
Hongarc 2018-12-01 06:37:25 +07:00
parent 052aa1e299
commit 489a4b9095
8 changed files with 14 additions and 17 deletions

View file

@ -11,7 +11,7 @@ var fallbackMap = {
// lets change underscores template settings so it interpolates
// things like "{branchName} does not exist".
var templateSettings = _.clone(_.templateSettings);
var templateSettings = Object.assign({}, _.templateSettings);
templateSettings.interpolate = /\{(.+?)\}/g;
var template = exports.template = function(str, params) {
return _.template(str, params, templateSettings);
@ -106,7 +106,8 @@ exports.getStartDialog = function(level) {
markdown: str('error-untranslated')
}
};
var startCopy = _.clone(
var startCopy = Object.assign(
{},
level.startDialog[getDefaultLocale()] || level.startDialog
);
startCopy.childViews.unshift(errorAlert);