[bugfix] Locale: can not modify functional message (#3498)

This commit is contained in:
neverland
2019-06-13 17:20:20 +08:00
committed by GitHub
parent 1327ccb831
commit 639450709f
2 changed files with 21 additions and 3 deletions

View File

@@ -11,7 +11,7 @@ function assignKey(to: ObjectIndex, from: ObjectIndex, key: string) {
return;
}
if (!hasOwnProperty.call(to, key) || !isObj(val)) {
if (!hasOwnProperty.call(to, key) || !isObj(val) || typeof val === 'function') {
to[key] = val;
} else {
to[key] = deepAssign(Object(to[key]), from[key]);