Skip to content

Commit

Permalink
fix: correct wrapping of return value
Browse files Browse the repository at this point in the history
  • Loading branch information
jh-leong committed Aug 31, 2024
1 parent aa5a3ff commit d054878
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/reactivity/src/arrayInstrumentations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ function apply(
// handling and directly call apply with self.
if (methodFn !== arrayProto[method as any]) {
const result = methodFn.apply(self, args)
return needsWrap ? toReactive(result) : result
return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result
}

let wrappedFn = fn
Expand Down

0 comments on commit d054878

Please sign in to comment.