MCPcopy
hub / github.com/vuejs/core / mergeDataFn

Function mergeDataFn

packages/runtime-core/src/componentOptions.ts:1041–1058  ·  view source on GitHub ↗
(to: any, from: any)

Source from the content-addressed store, hash-verified

1039}
1040
1041function mergeDataFn(to: any, from: any) {
1042 if (!from) {
1043 return to
1044 }
1045 if (!to) {
1046 return from
1047 }
1048 return function mergedDataFn(this: ComponentPublicInstance) {
1049 return (
1050 __COMPAT__ && isCompatEnabled(DeprecationTypes.OPTIONS_DATA_MERGE, null)
1051 ? deepMergeData
1052 : extend
1053 )(
1054 isFunction(to) ? to.call(this, this) : to,
1055 isFunction(from) ? from.call(this, this) : from,
1056 )
1057 }
1058}
1059
1060function mergeInject(
1061 to: ComponentInjectOptions | undefined,

Callers

nothing calls this directly

Calls 2

isCompatEnabledFunction · 0.90
isFunctionFunction · 0.90

Tested by

no test coverage detected